On 26 January 2011 08:10, JE <[email protected]> wrote: > Thank you for clarifying the use of WSGIProcessGroup and > WSGIDaemonProcess. > Before reading your answer, I think I really misunderstood how they > relate to each other. > It helped me with fixing our server config. > > Here is a bit of context why our server config is a bit different from > your recommendation (one processgroup per website): > > Our config is now: one process group, n virtual hosts using this > single process group, using the same python code called with the > specific environment for the virtual host. > This makes our current server config a bit fragile, since one global > python variable can mess up our websites.
Presumably you are also using WSGIApplicationGroup to also force use of same sub interpreter in process, else they will still all be distinct, just in same process. > On the other hand, if we use separate processes per website we > actually need to estimate correctly, how many processes, each website > will need. > Even worse, if we want, let's say, 25 websites on a single server, we > would need 25 WSGI processes. > If our server can only take 10 WSGI processes (because of memory > requirements) it wouldn't be possible. > Our current setup allows any number of websites as long as the total > traffic can be handled by the 10 WSGI processes, with the caveat that > we can't have any globals by accident... Which is all fine if you manage your code. As I pointed out, some frameworks don't make that possible. FWIW, there is some interest for future Django to make it so you can host multiple sites within single Django instance. If that happens then would be pretty cool as currently Django sites need to be in separate sub interpreters or processes which as you point out uses more memory. BTW, are you using custom web code, or using one of the major frameworks? Graham -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
