lighttpd forum lighty > lighttpd connection problem

Posted by Dennis Kort (Guest)
on 20.09.2008 13:03
Hi,

I am using lighttpd-1.4.19 for a website with about 40reqs/sec on Debian 
Etch and everything is really fast. The problem is just, that lighttpd 
sometimes stops serving the site to a client while the page is loading 
and then waiting for the timeout in server.max-write-idle while the 
browser displays a half loaded page.

After the timeout I get the following entry in the error_log:

2008-09-20 14:57:40: (server.c.1258) NOTE: a request for / timed out 
after writing 16595 bytes. We waited 360 seconds. If this a problem 
increase server.max-write-idle

Its strange, because the server.max-write-idle actually doesn't matter. 
My problem is that lighttpd stops serving the site after one second (or 
even less) - but the connection is still open and the browser is waiting 
until the timeout.

That happens about every 5000th request.

Thanks for some help,
Dennis Kort
Posted by Rudy Setiawan
on 21.10.2008 21:15
heya dennis,
did you get a chance to resolve this issue?
I am having the same problems

2008-10-21 14:10:45: (server.c.1258) NOTE: a request for / timed out 
after writing 34500 bytes. We waited 720 seconds. If this a problem 
increase server.max-write-idle

Did you use php fastcgi as well? I think this is the problem with the 
php-fastcgi thing or the connection to it.
I read somewhere that php fastcgi doesnt recycle or something like that.

I tried multiple configurations of php-fastcgi:

1st config:
<pre>
fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => 
"/var/run/lighttpd/php-fastcgi.socket",
                                   "max-procs" => 120,
                                   "bin-path" => "/usr/bin/php-cgi"
                                 )
                               )
                            )
</pre>

2nd config:
<pre>
fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => 
"/var/run/lighttpd/php-fastcgi.socket",
                                   "max-procs" => 10,
                                   "bin-path" => "/usr/bin/php-cgi",
                                   "bin-environment" => (
                                       "PHP_FCGI_CHILDREN" => "32",
                                       "PHP_FCGI_MAX_REQUESTS" => "5000"
                                   )
                                 )
                               )
                            )
</pre>

Both will show the same thingg at about the same Nth requests.

The site stalls, it looks like waiting for a php-cgi to be freed up.

if you have solved it can you shed some light on? :) or anyone?

Thanks!
Rudy


Dennis Kort wrote:
> Hi,
> 
> I am using lighttpd-1.4.19 for a website with about 40reqs/sec on Debian 
> Etch and everything is really fast. The problem is just, that lighttpd 
> sometimes stops serving the site to a client while the page is loading 
> and then waiting for the timeout in server.max-write-idle while the 
> browser displays a half loaded page.
> 
> After the timeout I get the following entry in the error_log:
> 
> 2008-09-20 14:57:40: (server.c.1258) NOTE: a request for / timed out 
> after writing 16595 bytes. We waited 360 seconds. If this a problem 
> increase server.max-write-idle
> 
> Its strange, because the server.max-write-idle actually doesn't matter. 
> My problem is that lighttpd stops serving the site after one second (or 
> even less) - but the connection is still open and the browser is waiting 
> until the timeout.
> 
> That happens about every 5000th request.
> 
> Thanks for some help,
> Dennis Kort