So a bit of background, I'm running a little web app using just in-memory data. It's about 20 rows all-in so I've removed the database to speed things up.

Just recently I deployed it on a Raspberry Pi, mostly to see if I could. However it's thrown up an issue with NGINX deployment.

It looks like, as a remedy against memory leaks, NGINX dumps the application instance every 12 hours or so and starts up a new one.

Edit: As requested by @gf_, The result is that any in-memory data being used by my app is lost, and the re-initialisation of my environment rebuilds the default data set. The server logs show a different pid by the timestamp.

Is there a way to stop this happening? Or increase the time between occurrences? Or set a threshold for memory usage?

I'm using NGINX with the Passenger module to deploy a Rails 4 application on Raspian.

  • Nginx do not restart child processes at will. It's something in your config or environment. – Alexey Ten Feb 4 '16 at 8:19
  • I'm sure it is, but what, exactly? – AJFaraday Feb 4 '16 at 8:28
  • "[...] NGINX dumps the application instance every 12 hours or so and starts up a new one [...]": Please elaborate. What happens exactly? – gf_ Feb 4 '16 at 10:02
  • 1
    @MichaelHampton That was one of the least helpful comments I've ever seen on the internet. "How do I lose weight?" "Have less gravity"... Obviously I'm in the situation I'm in and trying to fix a known problem. You just tell me it's 'obviously wrong' and don't even suggest an alternative. Perhaps de-high-horse yourself and actually suggest a solution of some variety? – AJFaraday Feb 4 '16 at 12:03
  • 1
    @MichaelHampton You modified your comment, which at least gives me some leads, now. But I seriously recommend against telling people "For obvious reasons, you're wrong". What, exactly, do you dislike about Passenger, by the way? – AJFaraday Feb 4 '16 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.