marlboroguy58 has asked for the wisdom of the Perl Monks concerning the following question:

hi monks, I need help! Although I am confident with my perl skills, not as sure with my understanding of Web technologies. Just started writing some CGI scripts. I have 2 CGI scripts, The first one is just a simple form, On submitting this form, a 2nd CGI scripts works on the form data and returns the output to the browser. Now, the second script sometimes takes very long probably 5-10 mins. The browser does not wait for such long and it throws an "Internal Server error". I understand, this is due to the time out. I need to know how i can make the browser wait till the script completes?

Replies are listed 'Best First'.
Re: Wait for CGI script to complete
by Anonymous Monk on Jun 22, 2009 at 09:43 UTC
Re: Wait for CGI script to complete
by afoken (Chancellor) on Jun 22, 2009 at 14:44 UTC
    The browser does not wait for such long and it throws an "Internal Server error".

    Nope, the SERVER generates that message, either because it KILLED your CGI for being far too slow, or because your CGI has crashed. Look at the error log to see what went wrong. If you don't have access to the error log, search for a better provider. Inserting ...

    use CGI::Carp qw(fatalsToBrowser);

    ... right after the first line may help you to debug your problem while you can't access the error log. Remove that line after you finished debugging, so you don't give additional information to malicious users.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      thanx, I have access to the logs, will check whats going wrong and get back.