|
Home > Archive > Perlbal > March 2007 > perlbal and very slowly generated, dynamic content
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
perlbal and very slowly generated, dynamic content
|
|
| Chad Austin 2007-03-07, 1:11 am |
| First: as of earlier today, I'd never touched PERL or Perlbal, and I'm
definitely not an expert at HTTP either. But I have a problem, and none
of the people I know who have written Perlbal plugins know what is
happening either. So maybe one of you on this list can help!
I have a php page that generates output very slowly, but steadily. It
can be simulated with something like:
<?php
set_time_limit(10 * 60); # 10 minutes
header('Content-type: text/plain');
for ($i = 0; $i < 60; $i++) {
echo "$i\n";
flush();
sleep(1);
}
Our backend web servers are running Apache, and Perlbal sits in front of
them.
When I run the page by hitting the apache instance directly, the page
runs to completion, so that's fine. The problem is not in php or
Apache. When I hit the page through Perlbal, it cuts off after 30
seconds, every time.
So, why would Perlbal close the connection after 30 seconds? I noticed,
in ClientHTTPBase.pm, this line:
# FIXME: let this be configurable?
sub max_idle_time { 30; }
But after looking around a bit more, that should only matter if the
connection has been idle, which it definitely hasn't, as I can watch the
content trickle down to my web browser. Also in ClientHTTPBase.pm, I
see "$self->{alive_time} = time;" inside of event_write, but I don't see
why that would stop being called.
Am I totally off base? Do you know what could cause the connection to
close prematurely?
--
Chad Austin
http://imvu.com/technology
| |
| Brad Fitzpatrick 2007-03-07, 1:11 am |
| Perhaps the other side of the connection is timing out... check both
ClientProxy and BackendHTTP ... one of them is dying due to not being
marked alive.
Probably a bug. Let me know when you find it.
- Brad
On Tue, 6 Mar 2007, Chad Austin wrote:
> First: as of earlier today, I'd never touched PERL or Perlbal, and I'm
> definitely not an expert at HTTP either. But I have a problem, and none
> of the people I know who have written Perlbal plugins know what is
> happening either. So maybe one of you on this list can help!
>
> I have a php page that generates output very slowly, but steadily. It
> can be simulated with something like:
>
> <?php
> set_time_limit(10 * 60); # 10 minutes
> header('Content-type: text/plain');
> for ($i = 0; $i < 60; $i++) {
> echo "$i\n";
> flush();
> sleep(1);
> }
>
> Our backend web servers are running Apache, and Perlbal sits in front of
> them.
>
> When I run the page by hitting the apache instance directly, the page
> runs to completion, so that's fine. The problem is not in php or
> Apache. When I hit the page through Perlbal, it cuts off after 30
> seconds, every time.
>
> So, why would Perlbal close the connection after 30 seconds? I noticed,
> in ClientHTTPBase.pm, this line:
>
> # FIXME: let this be configurable?
> sub max_idle_time { 30; }
>
> But after looking around a bit more, that should only matter if the
> connection has been idle, which it definitely hasn't, as I can watch the
> content trickle down to my web browser. Also in ClientHTTPBase.pm, I
> see "$self->{alive_time} = time;" inside of event_write, but I don't see
> why that would stop being called.
>
> Am I totally off base? Do you know what could cause the connection to
> close prematurely?
>
> --
> Chad Austin
> http://imvu.com/technology
>
>
|
|
|
|
|