Open bbss opened 10 years ago
I am having some problems with a http server, I use a http.NewServeMux to register several routes which I post a load of events to. Which then get propagated to a connected web-app over websockets.
All is fine and dandy but if I refresh the web app the pushing workers get an error and can not connect anymore. I can restart the workers and then I can push some events, the server will still accept post requests but no longer get pushed to the web-app.
I had an error like this: http: Accept error: accept tcp [::]:8081: too many open files; retrying in 5ms
Asking for Gophers help in #go-nuts @ freenode
Seems I finally fixed it, issue was I did not close the ws connection properly. Which took quite some effort to debug.
There is a bug that makes the server barf after a certain seemingly random amount of requests.
I was/am not sure whether it is caused by the redis server or the http server.
I've tried commenting out all the redis functionality but I still get big callstacks that don't give many google results.
I've tried adjusting the read and write timeout on the server. This does not yet solve the problem but changes it.