Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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

share|improve this answer
    
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 '12 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 '12 at 22:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.