Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help about TIMEOUT..

Status
Not open for further replies.

barbari

Programmer
Oct 26, 2002
9
IL
i have a program in perl, and while i try to start it this i see this massage:

CGI Timeout
The specified CGI application exceeded the allowed time for processing. The server has deleted the process.

how i increase the TIMEOUT from the program?
thanks...
 
not sure if this is code specific, but you can try the following in general:

Code:
#!/usr/bin/perl -w
$| = 1; #enable autoflush mode

alternatively yuo can add this to the script:
Code:
#!/usr/bin/perl -w
use CGI qw/:standard -no_debug/;
$| = 1;
print CGI::header(-nph=>1);
---
cheers!
san.
 
This is not working, the problam alredy...
my program:
and the server timeout close my program.

use CGI qw/:standard -no_debug/;
$| = 1;
print CGI::header(-nph=>1);
print "sdfsdf";

use LWP::Simple;
$got = get("print $got;
 
which server are you using? Apache, IIS or something else?

---
cheers!
san.
 
It indeed is a valid site, I just now tried to access it and it came up fine... //Daniel
 
Maybe it's a DNS issue. Can you ping hosts by name from the server? //Daniel
 
Most web servers have a 'time-out' parameter that limits how long the web server will try to produce a complete http response (send a page). If a web server does not see some/any output from your CGI over that 'time-out' period, then the web server will kill the process and time-out.

IF this is the problem, San suggested part of a solution, above. Set $| to 1. That sets the output buffer size to 0 causing anything that goes into the output buffer to be output immediately. AND, your CGI must produce some output on a frequency smaller than the time-out period. For instance, if your CGI makes a system call that takes a long time to complete, then you will need to figure out a way to keep shooting some output to the browser while the system call runs. The web server will see a trickle of output and will not time-out.

Another possible fix is to modify the configuration of the web server, set the time-out period to a longer value. However, this does not sound like an option in your situation. 'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top