[wellylug] Setting a process going through apache
Pete Black
pete at marchingcubes.com
Thu Jun 30 08:18:20 NZST 2005
It may be as simple as raising the timeout for cgi scripts in the
apache config file.
e.g.
Timeout 600 (for a 10 minute timeout period)
http://httpd.apache.org/docs-2.0/mod/core.html#timeout
However, I have a feeling that there is no separately settable 'max
time for execution of cgi script' in apaches standard cgi setup, and if
you simply ensure that something is sent back to the browser
periodically while your report runs (e.g. a '.' between each query or
something so that you get a 'Running:.................................'
type output as the report executes, that you won't hit the timeout.
Otherwise, I would do as grant suggested, and spawn your report script
via the system() call in a small 'wrapper' script. This is ultimately a
better solution, especially if your report script can write a log file
that the wrapper script can poll for status via a META REFRESH so you
can see execution progress in the background .
-Pete
> Hi geniuses,
>
> This could be slightly off topic, but the apache server is running on
> linux (slackware of course, what else is there?)
>
> I have an apache web server serving up an browser interface to our
> membership system. I can get simple (and some complex) reports working
> and can even get them emailed to people.
>
> But there are a couple of complex queries and reports that take a wee
> while to run and when I try to run them from the browser something
> seems
> to timeout and they don't complete.
>
> So, how can I use the browser to get apache to get a perl script
> running
> as a seperate process in the background? You know, click 'go' and it
> comes back saying your report should be in your inbox in 10 minutes
> type
> thing?
>
> Email me off list if you want,
>
> Cheers muchly in advance,
>
> Ian
>
>
>
> --
> Wellington Linux Users Group Mailing List:
> wellylug at lists.wellylug.org.nz
> To Leave: http://lists.wellylug.org.nz/mailman/listinfo/wellylug
More information about the wellylug
mailing list