Server randomly crashing


#1

Any idea why this happens and how to fix it?

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: write after end
    at ServerResponse.OutgoingMessage.write (_http_outgoing.js:430:15)
    at IncomingMessage.ondata (_stream_readable.js:542:20)
    at emitOne (events.js:77:13)
    at IncomingMessage.emit (events.js:169:7)
    at IncomingMessage.Readable.read (_stream_readable.js:368:10)
    at flow (_stream_readable.js:759:26)
    at resume_ (_stream_readable.js:739:3)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)

I’ve seen it happening a bunch during local development recently.


#2

Hi, were you able to solve this problem?


#3

Yes. We were serving an iframe from the public folder for an ad. This wasn’t playing nicely with iron router. We added this item as a server side route and it fixed the issue.