Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > timeout problem

Reply
Thread Tools

timeout problem

 
 
shurikgefter@gmail.com
Guest
Posts: n/a
 
      02-13-2007
Hi,

I run the following script in apache.
-----------------------------------------------------------------------
#!/usr/local/bin/perl
print "Content-type:text/html\n\n";
print "<html><body>";

`/tmp/bin/unpack.pl `;
$comm_status = $?;

if( $comm_status eq "0" ) {
print "Done";
} else {
print "Error";
}

print "</body></html>";
-----------------------------------------------------------------------

the unpack.pl run ~10 minutes ( the default timeout is 5 minute ) and
when its finished I dont get the script output ( Done or Error ).
How I can solve it without change the default definition of timeout in
httpd.conf.

Thanks

 
Reply With Quote
 
 
 
 
J. Gleixner
Guest
Posts: n/a
 
      02-13-2007
wrote:
> Hi,
>
> I run the following script in apache.
> -----------------------------------------------------------------------
> #!/usr/local/bin/perl
> print "Content-type:text/html\n\n";
> print "<html><body>";
>
> `/tmp/bin/unpack.pl `;
> $comm_status = $?;
>
> if( $comm_status eq "0" ) {
> print "Done";
> } else {
> print "Error";
> }
>
> print "</body></html>";
> -----------------------------------------------------------------------
>
> the unpack.pl run ~10 minutes ( the default timeout is 5 minute ) and
> when its finished I dont get the script output ( Done or Error ).
> How I can solve it without change the default definition of timeout in
> httpd.conf.


http://www.stonehenge.com/merlyn/Web...ues/col20.html
 
Reply With Quote
 
 
 
 
xhoster@gmail.com
Guest
Posts: n/a
 
      02-13-2007
wrote:
> Hi,
>
> I run the following script in apache.
> -----------------------------------------------------------------------
> #!/usr/local/bin/perl
> print "Content-type:text/html\n\n";
> print "<html><body>";


## This might interfere with the system commands, but
## in my hands it doesn't.
## Also, this placates my server's (and browser's) timeout, but your server
## may vary.

$SIG{ALRM}=sub {print ".\n"; alarm 10};
alarm 10;

> `/tmp/bin/unpack.pl `;


#Why use backticks if you aren't doing anything with the results?

alarm 0;
print "<hr>";

....


Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timeout::timeout and Socket timeout Mark Probert Ruby 1 10-06-2004 09:30 AM
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Guoqi Zheng ASP .Net 4 06-03-2004 06:39 PM
Session contents lost despite Session.Timeout = 3000; and <sessionState mode="InProc" cookieless="false" timeout="300"> Carpe Diem ASP .Net 3 02-23-2004 07:10 PM
web.config session timeout and forms authentication timeout Do ASP .Net 2 11-23-2003 02:27 PM
Re: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Bob Johnson ASP .Net 0 08-07-2003 12:52 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57