Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: ERROR on CGI script:The timeout specified has expired

by bellaire (Hermit)
on Nov 24, 2009 at 14:08 UTC ( #809082=note: print w/replies, xml ) Need Help??

in reply to ERROR on CGI script:The timeout specified has expired

According to this bug report for Apache, this problem is usually generated when your script is dumping a lot of data to STDERR. Alternatively, it can happen when apache is waiting for large chunks of data on STDOUT as well.

It seems you need to find some way to reduce the volume of output produced by your script.

  • Comment on Re: ERROR on CGI script:The timeout specified has expired

Replies are listed 'Best First'.
Re^2: ERROR on CGI script:The timeout specified has expired
by Anonymous Monk on Nov 24, 2009 at 14:57 UTC
    Hi bellaire,

    Thanks for your suggestion. I understood, this is the bug report I was talking about .. saw it after checing in google. Acually my cgi script is not doing anything fancy, it's running a query (little complex)to Database and the returned data is getting used to generate the output, which in turn I am displaying in page. It's mainly waiting for the query result and before the query completes it's expiring. As, per your comment ... I can't exclude this query ... is there any other way?


      Not that I know of, but I only know what the Apache folks said on that bug report. Try running your query from the command line. The bug report suggests that the timeout isn't actually because your script takes 300sec to execute, but because the volume of output it produces breaks Apache's attempts to keep up with it.

      I'd suggest running your script on the command line to determine:

      • Does it really take >5 minutes to run?
      • How much output is sent to STDOUT/STDERR?
      That should give you a better idea of what you can reduce (time or output).

      You can check the Apache "Timeout" directive. However, how long does it take to run the query in A SQL Console?

      Are you sure that ur not generating a lot of STDERR output?

      A contentious debate is always associated with a lack of valid arguments.
        Gulden, I am sure that, it's not generating STDERR (very few may be), I have already tried redirecting STDERR as per the bug report. About, the query ... query takes almost 7 minutes to complete in sql console. I am sure that, due to this long running query only it's getting expired. Thanks

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://809082]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2019-10-24 02:04 GMT
Find Nodes?
    Voting Booth?