kipraske / web-brogue

Play brogue in a web browser
GNU General Public License v2.0
20 stars 17 forks source link

Server Crashes on EPIPE write #30

Closed kipraske closed 9 years ago

kipraske commented 9 years ago

It seems to occur because multiple things are trying to use the stdout for the process. In this case I need to put an error event on my server.

See: http://grokbase.com/t/gg/nodejs/129pfjb7wd/node-js-unhandled-error-event-write-epipe

kipraske commented 9 years ago

Going to see if 39c28209, but it will take some running. The error doesn't happen very often.

kipraske commented 9 years ago

This still is happening. I guess pointing out the issue number automatically closes the issue. Huh.

kipraske commented 9 years ago

More links https://github.com/joyent/node/issues/3211 https://www.npmjs.com/package/epipebomb

This error seems to be related to closing a pipe while a stream is writing to it. My last commit just added an error event to process.stdout... but I guess that is not the stream that is getting screwed up.

Time to start putting error listeners on any suspects. Next would be the ws object and the http server object. Technically could be one of them.

kipraske commented 9 years ago

More work on this - putting error listeners on the http server, the ws server, and the ws instances. Hopefully that will catch this guy.

kipraske commented 9 years ago

Nope still happens. Uh, I have little control over this so It is time to bring out the big guns: domains

kipraske commented 9 years ago

Caught using domains. Not clean but it seems to work. Closing for now.