Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users
CGI-BIN Timeout Question w/ Python
 

Index | Next | Previous | View Flat


scavanau at cisco

Mar 2, 2012, 7:21 AM


Views: 163
Permalink
CGI-BIN Timeout Question w/ Python

Hello All,



I am trying to write a webpage wrapper for some scripts I have written
in python on my FreeBSD 9 machine.



When I do this on the command line



#python tests.py



It works fine, although the script takes 8 full seconds to
run...(normal) when I do a:



proc = subprocess.Popen(['/usr/local/bin/python', 'tests.py'],
stdout=subprocess.PIPE)



in a cgi-bin .py webpage the script seems to time out. There are no
errors in the log (/var/log/httpd-error.log). When I make a 'fake'
shorter version of the script that only takes a fraction of a second to
run (versus the full 8 second version) the subprocess.Popen command
works fine and returns the data fine to the web browser. Doing some
digging it looks like the cgi-bin timeout is default at 300 seconds
which I am nowhere near... I am not sure where to go at this point... I
was thinking of running this in the background so the script can
continue on using (&) and then checking afterwards for a results file or
something... but that seems like a crappy fix. Sorry to be so ambiguous
but I have no errors (just behavior) to work with and I think it's
probably an architecture problem with the way I am approaching this on
apache. I am open to any and all suggestions but unfortunately I can
switch off FreeBSD 9.





============================

Sean Cavanaugh

Cisco Global Certifications Team - IPv6

Subject User Time
CGI-BIN Timeout Question w/ Python scavanau at cisco Mar 2, 2012, 7:21 AM
    Re: CGI-BIN Timeout Question w/ Python tevans.uk at googlemail Mar 2, 2012, 8:00 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.