[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-WebCGI] Re:how to prevent time-out with slow output stream



Dear David,

thanks a lot for your reply.

>>I have  a MacPerl CGI (running under MacOS 9, QPQ2.1) that sanns a 
>>number of files for patterns and generates a dynamic web-page with 
>>the result. As long as the number of files to scan is relatively 
>>small everything works fine.  However, when I screen about 2500 
>>files the CGI takes about 1 min to generate the output. I set the 
>>server time-out to 300 sec which should be enough but usually the 
>>clients time-out much earlier. Is there a way to prevent this?
>
>As far as I have been able to figure (and I have had some experience 
>with this issue) the only solution is to return the output a bit at 
>a time, a technique sometimes called "server push".  Unfortunately, 
>the only way to activate server push for a MacPerl CGI is to name it 
>with the .acgi suffix.  I say unfortunately in that this ALSO 
>signals to QPQ that your CGI can handle a second request while the 
>first is still processing, which is very much not true and results 
>in anything from a dropped request to a crashed server.  For a 
>public server I would recommend never doing this.  The only time you 
>can safely name your CGI scripts with the .acgi suffix is if you can 
>guarantee that there will never, ever be overlapping hits or if you 
>can tolerate crashes.
>
>If you are still interested, let us know and I will post a "step by step".

So it seems to me the safest way would be to write the output to a 
temporary html-file and let a web-page reload this page after 2 min 
or so. However, I would be interested in the step-by-step 
instruction. The CGI is not expected to handle a lot of requests and 
I would appreciate avoiding the temp-file.

Thanks in advance - Christoph
-- 
Christoph Grunau  (Eq. Roizes)
Institut de Genetique humaine (CNRS, IGH)
141 rue de la Cardonille
34396 Montpellier
FRANCE

Tel.: +33 (0) 4 99 61 99 77
Fax:  +33 (0) 4 99 61 99 01
Christoph.Grunau@igh.cnrs.fr
http://www.methdb.de

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org