views:

212

answers:

1

I am running the latest version of web.py with mod_wsgi and have this in my code:

application = web.application(urls, globals(), autoreload=True).wsgifunc()

It is autoreloading most of the time but every so often I need to go to the command line and restart Apache myself. Any idea why it is not always "autoreloading"?

Details:

Apache 2.2.12
Python 2.6
web.py 0.33
mod_wsgi 3.1
+1  A: 

You shouldn't rely on the internal web.py reloading mechanism under Apache/mod_wsgi as not likely to work properly if at all. Disable the web.py reloading mechanism if you have enabled it in some way, and then read:

http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode

This explains how reloading works under Apache/mod_wsgi.

In short, use mod_wsgi daemon mode and after changes touch the WSGI script file.

Graham Dumpleton