I have a python web.py app with long (minutes) start-up time that I’d like to host with in Apache with mod_wsgi.
The long-term answer may be “rewrite the app.” But in the short term I’d like to configure mod_wsgi to:
- Use a single process to serve the app (I can do this with
WSGIDaemonProcess processes=1),
and - Keep using that process without killing it off periodically
Is #2 doable? Or, are there other stopgap solutions I can use to host this app?
Thanks!
Easy. Don’t restart Apache, don’t set maximum-requests and don’t change the code in the WSGI script file.
Are you saying that you are seeing restarts even when you leave Apache completely untouched?
And yes it sounds like you should be re-architecting your system. A web process that takes that long to startup is crazy.