Downtime when rebooting the mod_wsgi modem?

I am running a Django application on Apache with mod_wsgi. Will there be downtime during the upgrade?

Mod_wsgi is running in daemon mode, so I can reload my code by touching the .wsgi script file as described in the ReloadingSourceCode document: http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode . Presumably, a reboot takes some non-zero amount of time. What happens if a request arrives during a reboot? Will Apache queue the request and then complete it as soon as the wsgi daemon is ready?

The documentation contains the following instructions:

So, if you use Django in daemon mode and you need to change the file 'settings.py', after making the necessary changes, tap the script file containing the entry point of the WSGI application. Having done this, the next time the process is restarted, your Django application restarts.

For me, this suggests that Apache will gracefully handle every request, but I thought I would ask you to be sure. My application is not critical (a little downtime will not be catastrophic), so the question is mostly academic.

Thank.

+5
source share
2 answers

WSGI script . , Apache, Apache, , , daemon mod_wsgi .

, mod_wsgi . , , - , .

, .

, . , , , .

5 . , shutdown-timeout WSGIDaemonProcess, .

, , , , , WSGI script, , .

, , , , WSGI . , , ​​ . , . , , , , TurboGears. Django , , -, Flask.

, , , . , HTTP- . , , , , .

+18

, . , , , .

, , , .

apachectl graceful Apache , , .

+1

All Articles