On 1 December 2010 21:45, Alessandro Pasotti <[email protected]> wrote: > 2010/12/1 Graham Dumpleton <[email protected]> >> >> On 1 December 2010 21:11, Alessandro Pasotti <[email protected]> wrote: >> > 2010/12/1 Graham Dumpleton <[email protected]> >> >> >> >> On 30 November 2010 19:32, elpaso <[email protected]> wrote: >> >> > Hi, >> >> > A last (and probably dumb) question: I cannot understand the how the >> > configuration in main apache2.conf <IfModule mpm_prefork_module> section >> > interacts with the WSGI* directives in the virtual server config >> > section, >> > can you please point me to some docs ? For example: if apache decides to >> > activate two servers and processes=10, shall I end up with 20 WSGI >> > processes >> > and so on ? Or 10 is a global limit regardless the number of apache >> > preforked servers? >> >> The Apache child processes acts as proxies for requests to mod_wsgi >> daemon processes. So Apache MPM configuration must allow for more >> concurrent requests than the fixed number of mod_wsgi daemon processes >> can handle. >> >> The mod_wsgi daemon processes are forked from Apache parent and not >> child processes and so what you declare in directive is how many you >> get, no more and no less. > > So, if I use apache only for this single application I can just set > MaxServers 1 ? As in: > > <IfModule mpm_prefork_module> > StartServers 1 > MaxServers 1
No. That allows only one concurrent request to be handled by Apache. Your daemon process group allows for 10*1=10 concurrent requests and so having MPM configuration only allow 1 means you would never use all 10. >> BTW, can you use worker MPM instead of prefork MPM or are you stuck >> with using it because of PHP being used? >> >> There are some odd process issues that seem only to come up with >> prefork MPM, albeit very rare and still not sure of cause yet. > > I thought I couldn't use worker MPM because the c/c++ libs used in > GeoDjango are not thread safe and worker MPS uses threads, but if WSGI > directives have full control I guess setting threads=1 will suffice. You aren't running GeoDjango in the Apache child processes so doesn't matter that they are multithread with worker MPM as they only proxy requests. The daemon mode processes that GeoDjango runs in you are configuring separately and so you can say that for them you have multiple processes with single thread. 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.
