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

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?

Thanks.
  • Comment on Re^2: ERROR on CGI script:The timeout specified has expired

Replies are listed 'Best First'.
Re^3: ERROR on CGI script:The timeout specified has expired
by bellaire (Hermit) on Nov 24, 2009 at 15:06 UTC

    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).

Re^3: ERROR on CGI script:The timeout specified has expired
by gulden (Monk) on Nov 24, 2009 at 15:07 UTC

    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
        7 Mins is one hell of a query time. A few thoughts occur
        • Which DBD ?
        • Could your data be re-organised/rationalised in such a way that there were fewer complex joins?
        • Could you re-organise your data so that you are only using one prinary key on each table.
        MySQL in particualr is faster if smaller queries are agregated than it is if asked to make complex JOINs (at least it was 5 years ago when last I used it).