You are missing WSGIProcessGroup directive or process-group option to WSGIScriptAlias, so you aren't even delegating requests to be handled by the mod_wsgi daemon process group. That will be in part why things are not making sense.
For more background go watch: https://www.youtube.com/watch?v=H6Q3l11fjU0 https://www.youtube.com/watch?v=k6Erh7oHvns Graham > On 14 Dec 2023, at 1:45 am, Manu Itutur <[email protected]> wrote: > > Hello, > > I'm having an hard time understanding the correlation between mod_wsgi Daemon > Processes and apache mpm_worker (if there is any). > > I'm running a Django application on an Ubuntu 22.04 Apache Server, and I > would like to optimise the CPU / RAM usage of it, as it looks like when there > is a hight number of user / requests, the CPU usage is limited to around 60%. > > > My Apache configuration is currently the following: > > WSGIDaemonProcess ipt python-path=virtualenv/lib/python3.7/site-packages > processes=7 threads=2 display-name=custom-apache > WSGIScriptAlias / conf/wsgi.preprod.py process-group=custom > application-group=%{GLOBAL} > WSGIApplicationGroup %{GLOBAL} > <Directory conf> > <Files wsgi.preprod.py> > Require all granted > Order allow,deny > Allow from all > </Files> > </Directory> > > And my MPM conf file (which are the default settings of Apache2): > > <IfModule mpm_prefork_module> > StartServers 5 > MinSpareServers 5 > MaxSpareServers 10 > MaxRequestWorkers 150 > MaxConnectionsPerChild 0 > </IfModule> > > > I read multiple time this documentation > https://modwsgi.readthedocs.io/en/master/user-guides/processes-and-threading.html#the-mod-wsgi-daemon-processes > but I don't realy understand how the mpm_prefork_module and the > WSGIDaemonProcess combine with each other and how to tweak the value > "safely". > > Should I only increase processes and threads at the WSGIDaemonProcess without > modifying the mpm_prefork_module? Or are both conf related? > > Thanks for your clarification > > Emmanuel > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/modwsgi/d278edf0-017d-4a2b-bf14-98f21b21346bn%40googlegroups.com > > <https://groups.google.com/d/msgid/modwsgi/d278edf0-017d-4a2b-bf14-98f21b21346bn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/0488C599-A832-4143-9D7F-EE0A6FE16AA6%40gmail.com.
