You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by "Matthew A. Bockol" <mb...@carleton.edu> on 2007/11/27 00:05:51 UTC

30 second timeout

Hi Folks,

I've got an .epl script that is failing to run past 30 seconds.  Here's a very simple example:

[$ var $foo $]

[- $foo = "Hello" -]

[+ $foo +]

[$ while (1==1) $]

  [- $foo = time -]
  [+ $foo . "<br>" +]

[$ endwhile $]

The actual script is doing some db queries, but the affect (> 30 seconds to run) is the same.

When I hit that it times out at 30 seconds. I've tried with the browser and wget (which has a 900 second default timeout according to the man page).  I think this is happening because Embperl doesn't send a response until after the full output is completed, but it looks to be the server that's enforcing the cutoff.  I'm running 2.2.0 under mod_perl 2.0.2 and httpd 2.2.4.

Is there some way to adjust the server timeout to exceed 30 seconds? Meanwhile, I'm trying to speed up the execution of my script as a stop gap. :)

Thanks much,
Matt Bockol


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


RE: 30 second timeout

Posted by Andrew O'Brien <an...@oriel.com.au>.
Hi Matthew,

> I've got an .epl script that is failing to run past 30 
> seconds.  Here's a very simple example:

[snip]

> When I hit that it times out at 30 seconds. I've tried with 
> the browser and wget (which has a 900 second default timeout 
> according to the man page).  I think this is happening 
> because Embperl doesn't send a response until after the full 
> output is completed, but it looks to be the server that's 
> enforcing the cutoff.  I'm running 2.2.0 under mod_perl 2.0.2 
> and httpd 2.2.4.
> 
> Is there some way to adjust the server timeout to exceed 30 
> seconds? Meanwhile, I'm trying to speed up the execution of 
> my script as a stop gap. :)

The timeout on the apache side is controlled by the "Timeout" variable
in your config file. Under debian at least this is set to 300 (5 min) by
default. Have a look at /etc/apache2 or wherever your apache config
files live and check the value.

If you're talking directly to the server (no proxies etc) then this
should be the culprit.

As an aside, how long are you expecting the page code to take?


In HTML::Embperl there was an optEarlyHttpHeader setting for
EMBPERL_OPTIONS. I can't see that available for Embperl and I'm not sure
its even possible with the structural changes made along the way. I'm
sure someone else with more experience in 2.2 can enlighten us though.

Cheers,

Andrew


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org