I have a Node JS application [MEAN stack - Node version: `v0.10.40`, Mongoose: `3.8.8`, Express: `4.0.0`.] running on a linux instance. It was working fine but during the past few days the app is responding really slow.
- For mongo queries, the below error is thrown `MongoError: cursor killed or timed out`.
- And for few queries even though the data is returned by the database, it is not being sent back to Angular from the controller. It is failing at `return res.json()` statement .
If I restart the app it seems to work most of the times but again after few hours the same issues reappear.
Command to start the app and stack allocation:
NODE_ENV=production forever start -a -l forever.log -o output.log -e error.log -c "node --stack_size=12288 --max-old-space-size=12288" server/app.js
The same app is working from my local machine which has the same node, express, mongoose version. Could you guys help with this.