Hi,
I'm writing a multiplayer game server using Gorilla websockets to talk to Javascript clients. So long as I stay under 20 clients, the connections seem very stable. However, if I go too far beyond 20 clients, connections start dropping off. Each client makes two websocket connections, one to a "control" server, another to an "instance" server.
The Error that comes back in the server log reads, "websocket: close 1006 unexpected EOF" -- which would seem to indicate that something is happening on the server, as 1006 is never sent over the connection. I've tried looking at chrome://net-internals/#events but nothing looks too out of the ordinary on the client side. (Basically looks like the server closes the connection and the browser behaves accordingly.) I've tried disabling the firewall, but this doesn't seem to make a difference. I've tried spawning phantomjs 2.0.0 instances on the server machine, but that obeys the same limit of around 20 stable clients. The same goes for phantomjs 2.0.0 clients on a laptop or regular browsers on 5 machines in the office.
I have the read and write deadlines set to about 250 years in the future:
var deadline = time.Now().Add(time.Duration(time.Hour * 2242560))
nc.ws.SetWriteDeadline(deadline)
nc.ws.SetReadDeadline(deadline)
What am I missing here, and what other tools can I try to diagnose the problem with?
--SCZ