Are you using mod_fastcgi
or mod_fcgid
? Anyway, you should just kill the fastcgi process (or have the process commit "suicide"), and apache will respawn another one, loading the new file. I use mod_fastcgi
, and this is what I see:
0> ps -ef | grep fcgi
www-data 687 683 0 09:39 ? 00:00:00 /usr/sbin/fcgi-pm -k start
www-data 1037 687 0 09:41 ? 00:00:00 /usr/bin/python /var/www/wsgi/fcgi.py
www-data 1038 1037 0 09:41 ? 00:00:00 /usr/bin/python /var/www/wsgi/fcgi.py
www-data 1039 1037 0 09:41 ? 00:00:00 /usr/bin/python /var/www/wsgi/fcgi.py
0> sudo kill 1037
0> ps -ef | grep fcgi
www-data 687 683 0 09:39 ? 00:00:00 /usr/sbin/fcgi-pm -k start
www-data 1142 687 2 09:43 ? 00:00:00 /usr/bin/python /var/www/wsgi/fcgi.py
www-data 1143 1142 0 09:43 ? 00:00:00 /usr/bin/python /var/www/wsgi/fcgi.py
www-data 1144 1142 0 09:43 ? 00:00:00 /usr/bin/python /var/www/wsgi/fcgi.py
If you are using the external server, you have to restart the fastcgi server instead. This is official documentation for application reloading in fastcgi:
http://www.fastcgi.com/docs/faq.html#application_reload