The CGI is finished when it exits. (Or, in rarer cases, when it closes STDOUT.) Some web servers are configured to time out if a script runs too long. ISPs do this for protection. It doesn't look like this is what you're running into.
The question that might you closer to your problem is
How does the client know when a CGI script is finished?The answer here is that a client, which can be a browser or and LWP script, can't easily tell whether the page being fetched is being generated dynamically or not. (It's possible, but not easy.) But the client can detect that either (a) the number of bytes specified in the HTTP "Content-header" response have been read, or (b) that the server has closed the socket. What you're probably seeing is the result of the client timing out before (b) is satisified. "The web server hasn't sent me anything in the last n seconds, so it's probably borked."
A solution to this is to slowly dribble some content out to the client. Have your index.cgi disable buffering, emit some content immediately, then for each link you check that succeeds, emit that link immediately. This should keep the client from timing out.
In reply to Re: Perl Output/Web Server Question
by dws
in thread Perl Output/Web Server Question
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |