Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Is CGI.pm my best choice?

by mitd (Curate)
on Dec 05, 2001 at 01:13 UTC ( #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!'


Comment on Re: Is CGI.pm my best choice?
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
Node Status?
node history
Node Type: note [id://129449]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2014-09-23 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls