Project

General

Profile

lighty connection timeout

Added by chicago1988 about 14 years ago

im getting lots of random connection timeouts. My server load is between 4-6 when this happens. I have 4GB ram free and no swap used. Ive checked the error logs and only getting (connections.c.1228) connection closed: poll() -> ERR 420, but they dont corespond to the number of connection timeouts. Ive got plenty enough php backends. htop shows around 370 tasks running with between 2-8 thr, the 'running' numebr changes between 1, and say 48 for example. netstat -apn | grep ESTABLISHED | grep ":80" | wc -l shows on average between 300 and 400.

My lighttpd.conf:

server.max-fds = 4096
server.max-connections = 2048
server.max-keep-alive-requests = 0
server.max-keep-alive-idle = 0
server.max-read-idle = 10
server.max-write-idle = 700
server.max-request-size = 10000
server.max-worker = 0 (changed from 4 but had no difference)

fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi",
"max-proc" => 1,
"idle-timeout" => 20,
"bin-environment" => ( "PHP_FCGI_CHILDREN" => "60", "PHP_FCGI_MAX_REQUESTS" => "600")
)
)
)

The strange thing is - it only occurs on random connections.. i can load site once really fast and then a few seconds later it could take upto 20 seconds to load. The site is running wordpress.

any ideas?


Replies (4)

RE: lighty connection timeout - Added by nitrox about 14 years ago

You might want to join #lighttpd on irc.freenode.net and report back to this thread if you got some help there.

RE: lighty connection timeout - Added by Olaf-van-der-Spek about 14 years ago

Enable syn cookies.
Use a network sniffer to see exactly what's going on.

RE: lighty connection timeout - Added by chicago1988 about 14 years ago

thanks for the help

I already have syn cookies enabled. Ive tried the network sniffing approach but nothing looks wrong.

Test performed at: 2011-02-28 12:16:48 (GMT -05:00)
Connect: 23.061 sec

Test performed at: 2011-02-28 12:17:52 (GMT -05:00)
Connect: 0.071 sec

The load, ram and cpu usage hardley changes, but it takes 23 seconds longer.

RE: lighty connection timeout - Added by Olaf-van-der-Spek about 14 years ago

Ah, so there's no time out, it just takes longer. Someone else hit a similar issue and it was due to a kernel process (kjournald or so).

    (1-4/4)