My Django app stops working when deployed on Apache ( with mod_wsgi ). It runs on a Windows server. The app calls on a windows executable called "rex" ( Alchemy Remote Executor ) which executes a command on another remote windows box.
process = subprocess.Popen( ['rex',ip,usr,pwd,command], stdout=subprocess.PIPE, universal_newlines=True )
out, err = process.communicate()
This all works fine in development, but when deployed on Apache with mod_wsgi, it doesn't work! The "rex" program still runs, but it fails to do it's thing, 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 is not able to make the required connections or something when it's spawned from Apache. It almost seems like Apache is somehow closing the connection made by "rex.exe" before it can finish!
Any ideas?