My Django application stops working when deployed to Apache (with mod_wsgi). It runs on a Windows server. The application calls a Windows executable called "rex" (Alchemy Remote Executor), which executes the command in another remote window window.
process = subprocess.Popen( ['rex',ip,usr,pwd,command], stdout=subprocess.PIPE, universal_newlines=True ) out, err = process.communicate()
All this works fine in development, but when deployed to Apache with mod_wsgi, it does not work! The rex program is still running, but it does not perform this task and gives the following message:
Failed to execute the program: A specified logon session does not exist. It may already have been terminated.
So, the "rex" program is running, but it cannot make the necessary connections or anything else when it came from Apache. It looks like Apache somehow closes the connection made by "rex.exe" before it can finish!
Any ideas?
python django subprocess apache mod-wsgi
Nick perkins
source share