First a few non-perly fundmentals:

The following happens after browser has made a connection.

  1. The Apache TimeOut directive controls when the webserver will give up and close connection when waiting to recieve data (from browser) or send data (static or cgi generated data). The TimeOut default in my version of Apache is 300 seconds.
  2. The human controlling the browser can also kill connection via STOP button or killing browser.
... It works fine when it is a small report that only takes 5 minutes or less, but if it has to parse a large amount of traffic over many log files, the script timesout before it is complete.
Looks like you are hitting the 300 second limit. So you can either up the TimeOut value (don't forget to reboot apache :) ) or use a different approach like some the suggestions already given. I beleive that it is never a good idea to keep user waiting. So what I have done with these types of long running 'Admin' type functions is to either create cron driven scripts that produce static report pages, or scripts that munge data down to a form that can be quickly transformed ie data->XML->XSLT->HTML. There is also a high bred method that I use when info is needed realtime up to the minute; scheduled preprocessing, cgi only recent data.

Good Luck

mitd-Made in the Dark
'Interactive! Paper tape is interactive!
If you don't believe me I can show you my paper cut scars!'


In reply to Re: Is CGI.pm my best choice? by mitd
in thread Is CGI.pm my best choice? by dru145

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.