full reload of fastcgi

R

Robin Becker

A recent problem with a fastcgi script leads me to ask if there's any well
defined way to fully reload a python fastcgi process. I know that people do
tricks like unloading/reloading all modules, but it seems there's no obvious way
to get python to restart itself. I believe that the server is apache based with
mod_fcgid.

The script in question suffers from two problems

1) it runs out of a zip file and the software can be upgraded by moving a new
zip file into place.

2) A cron job pulls new data into place which the script should notice.

The last is easy we can just re-read the data files before acting on the
request, but it seems much harder to reload all modules from the zipfile.

An easy way out is to just halt the running script when a software change is
detected. That means we must run with the old software for at least one request
and could be dangerous if an import is required during the last request.

Normally the upgrade process is supposed to move software into place and then
new data and then restart the fastcgi scripts; for whatever reason the error
seems to have been that the process was restarted with old data around.

Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,955
Messages
2,570,117
Members
46,705
Latest member
v_darius

Latest Threads

Top