0

I've got a VPS (Ubuntu 10.04, 512MB) on which I host 10-15 django sites, most of which have intermittent traffic. I'm wondering what the best hosting technique is in this situation, where the processes are mostly sitting idle.

Currently, I've got nginx as my frontend, with apache/mod_wsgi serving the django application, and inactivity_timeout set to minimise memory consumption in the idle processes. Is this the best option still? I've read a bit about gunicorn and uwsgi, and while they seem to offer some advantages, there seems no way to keep the memory consumption of their processes down when idle.

1 Answer 1

3

Are you sure you have read the uWSGI docs ? With over 300 options, it would be sad not having such a useful feature. Check --idle option, it does exactly what you need :)

I suggest you to run uwsgi --help too (from the command line), maybe some other parameter will catch your attention

2
  • Actually, I must confess I didn't read them very thoroughly, I'm more familiar with Gunicorn. Thanks for the tip, I'll give uwsgi a go and see how it works out.
    – Greg
    May 10, 2012 at 21:24
  • I've got a few sites running on uwsgi, and have tried various combinations of the cheap, idle and die-on-idle options, but the memory usage is staying high. Anything obvious I could be missing? I'm proxying from nginx to uwsgi via http for now, but I didn't think that would make a difference memory-wise.
    – Greg
    May 10, 2012 at 22:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .