Before respond properly, can you tell me how you are you setting up rest of the configuration? Are you using WSGIScriptAlias for a directory of files, or are you only allowing a single mounted WSGI application using WSGIScriptAlias?
Graham On 30 August 2010 20:05, virgil.balibanu <[email protected]> wrote: > I have a server where user can connect to and create their own > websites automatically. For this I use mod_wsgi in daemon mode with > predefined users for processes. Each site runs on it's own process. > The configuration file looks like this: > WSGIDaemonProcess site-1 user=site-1 group=nobody maximum-requests=300 > inactivity-timeout=300 > WSGIDaemonProcess site-2 user=site-2 group=nobody maximum-requests=300 > inactivity-timeout=300 > WSGIDaemonProcess site-3 user=site-3 group=nobody maximum-requests=300 > inactivity-timeout=300 > ... (with a lot of lines like these ones) > WSGIProcessGroup %{ENV:PROCESS_GROUP} > WSGIApplicationGroup %{GLOBAL} > I also use nginx as a front-end server for serving static files and I > proxy other requests to apache. > My problem is that whenever a process has been closed due to > inactivity and it needs to start again it would take around 5s if it > is the only one starting then, and can get to a lot more if I have 10 > or 20 processes starting at the same time. Also this time can go over > my limits set in nginx configuration for timeout and I could get a 504 > response from nginx. I need to use inactivity-timeout because I have > around 600 processes at the moment and the number is increasing and > each process uses around 20 to 25 MB of memory, so I would run out of > memory and get to use the swap if I did not use use it. I also use > maximum-requests in order to keep the process memory lower. > I am looking for any idea that would help me start a process faster, > or improve memory consumption. From what I understand this is because > each process has to load python and django thus the memory and time. I > there any way to improve this? How does WSGIProcessGroup and > ApplicationGroup help, are there better settings? > Also I would like to know if there are any apache options that I need > to play with? > RLimitMEM 205024597 > RLimitCPU 240 > KeepAlive On > MaxKeepAliveRequests 100 > KeepAliveTimeout 15 > Do I need to change add anything else, like # MaxSpareServers, > MinSpareServers, StartServers > > Thank you, > Virgil Balibanu > > -- > 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. > > -- 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.
