Perl redirection to browser timeout ...

J

JKH

I have a Perl script that is called by a web browser. The script may
take up to 60 seconds or more to complete processing before
redirecting the browser to a destination URL. The problem I'm
experiencing is that when the processing time is between 30
and 60 seconds, it returns a DNS error to the browser. If
under 30 seconds, the redirection is fine.

How can I prevent this?

Thank you, JKH
 
J

Jim Gibson

JKH said:
I have a Perl script that is called by a web browser. The script may
take up to 60 seconds or more to complete processing before
redirecting the browser to a destination URL. The problem I'm
experiencing is that when the processing time is between 30
and 60 seconds, it returns a DNS error to the browser. If
under 30 seconds, the redirection is fine.

How can I prevent this?

This question is frequently asked here, even though it is not directly
related to Perl (the answers would be the same for any language). In
fact, it was asked yesterday - search the newsgroup for 'Avoid Apache
Timeout Per Script'.

One approach will be found here:

<http://www.stonehenge.com/merlyn/LinuxMag/col39.html>
 
X

xhoster

JKH said:
I have a Perl script that is called by a web browser. The script may
take up to 60 seconds or more to complete processing before
redirecting the browser to a destination URL. The problem I'm
experiencing is that when the processing time is between 30
and 60 seconds, it returns a DNS error to the browser.

Why would it return a DNS error? That seems like an odd error to be
returned upon a CGI timeout. Do you know who is producing the error, your
CGI, or the httpd, or is the browser just making it up? Does your CGI
script perform DNS look ups?
If
under 30 seconds, the redirection is fine.

How can I prevent this?

you could keep redirecting back yourself until your script is done, then
redirect to the final destination.

Xho
 
J

JKH

Why would it return a DNS error? That seems like an odd error to be
returned upon a CGI timeout. Do you know who is producing the error, your
CGI, or the httpd, or is the browser just making it up? Does your CGI
script perform DNS look ups?


you could keep redirecting back yourself until your script is done, then
redirect to the final destination.

Xho

I ended up just printing "...\n" until the process was done. Not the
cleanest, but it works!
Thank you for all your suggestions.

JKH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,201
Messages
2,571,051
Members
47,656
Latest member
rickwatson

Latest Threads

Top