I am using this guide for Django: http://blog.dscpl.com.au/2015/04/using-modwsgi-express-with-django.html
Now if I want to use daemon mode, do I have to set up everything manually ? A problem I have when doing it manually is that in Django, wsgi.py by default is at the same location as the settings.py file that must remain secret, so I can't "Allow from all" access to that folder in my Apache config, as the quick config guide <https://modwsgi.readthedocs.org/en/develop/user-guides/quick-configuration-guide.html#delegation-to-daemon-process> suggests. And both files have to remain inside the project for import purposes. Sorry if I don't understand the matter well (or, to be honest, at all). Le mardi 19 avril 2016 10:34:39 UTC+2, Julien Delafontaine a écrit : > > I am using mod_wsgi-express: > > mod_wsgi-express setup-server ${baseDir}/project/wsgi.py --port=8887 > --user myapp --server-root=${remoteDir}/mod_wsgi-server --processes 2 > --threads 5; > > Then > > ${remoteDir}/mod_wsgi-server/apachectl restart > > This sets up the configuration itself, it seems. I thought > mod_wsgi-express would run daemon mode by default? > > > Le mardi 19 avril 2016 10:19:01 UTC+2, Graham Dumpleton a écrit : >> >> Sounds like you are using embedded mode rather than daemon mode. In >> embedded mode Apache will recycle processes. >> >> How do you have it configured? Are you using >> WSGIDaemonProcess/WSGIProcessGroup directives at all? >> >> Graham >> >> On 19 Apr 2016, at 6:12 PM, Julien Delafontaine <[email protected]> >> wrote: >> >> Hello, >> >> I have a multi-processes mod_wsgi application that stores some cache data >> in memory. Each process naturally gets its own instance of that cache. Now >> it seems that processes after some time get killed/restarted/whatever, so >> that the cache has to be reinitialized everytime this happens. How can I >> control it ? >> >> Ideally I'd like to start 2 Apache/mod_wsgi processes, initialize the >> cache on each, and let the app run forever without needing to recompute the >> cache. Is that possible? >> >> -- >> 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 post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/modwsgi. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
