Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: CGI hangs unless print

by hippo (Bishop)
on May 23, 2017 at 08:34 UTC ( [id://1190941]=note: print w/replies, xml ) Need Help??


in reply to CGI hangs unless print

It needs a print statement or it will hang.

In the absence of any code, I will guess that it doesn't actually hang but instead times out. The web server and the web client will both have timeouts so that connections are not maintained indefinitely in the absence of data transfer. You can either avoid the timeouts by transferring some data (eg. the printing of dots which you've already found) or better yet you could restructure your code so that it runs in the background on the server and the client polls to determine when it has finished. The latter is generally accepted to be the better solution because it doesn't clog up the server with long-lived connections doing precious little.

There is of course a third option which is to optimise your code so that it produces results in a reasonably short time.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-19 02:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found