Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Is CGI.pm my best choice?

by mitd (Curate)
on Dec 05, 2001 at 01:13 UTC ( [id://129449]=note: print w/replies, xml ) Need Help??


in reply to Is CGI.pm my best choice?

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!'

Replies are listed 'Best First'.
Re: Re: Is CGI.pm my best choice?
by dws (Chancellor) on Dec 05, 2001 at 01:31 UTC
    I believe that it is never a good idea to have user waiting.

    Not quite what you meant by "waiting", but merlyn has a column that describes how to give users periodic feedback on long searches.

Re: Re: Is CGI.pm my best choice?
by mitd (Curate) on Dec 05, 2001 at 05:12 UTC
    Yup, right on! If you do have to make'em wait let them know whats going on. My point ( not really well made :) ) was alot /perhaps most of the time these kinda problems don't need realtime processing.

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (None)
    As of 2024-04-25 02:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found