Due to some issues we are having where we are getting a node.js error on our Galaxy server (here is a copy of the error):
2017-02-23 14:38:42-08:00events.js:72 2017-02-23 14:38:42-08:00 throw er; // Unhandled 'error' event 2017-02-23 14:38:42-08:00 ^ 2017-02-23 14:38:42-08:00Error: read ECONNRESET 2017-02-23 14:38:42-08:00 at errnoException (net.js:905:11) 2017-02-23 14:38:42-08:00 at TCP.onread (net.js:559:19)
These errors are becoming more frequent - sometimes happening once per hour. We are not able to reproduce this on our Development server, only have it affecting our Galaxy server.
I contacted Galaxy support to see if they could provide any more information on the error, and MDG has suggested using the longjohn NPM package: https://github.com/mattinsler/longjohn
Only problem is, when installing it through the typical Meteor NPM installation process (as found in the guide), whenever I “require” it in any file, my app hangs on load. Never fully initializes after the “Starting Mongo” step.
If I comment out the require line, works perfectly. Restore the require line, hangs on load again. No error or anything, just permanent freeze on load.
Any ideas on why this might be happening? Or is there a different way that longjohn must be required in a Meteor project to initialize properly?