Project

General

Profile

Actions

Bug #1196

closed

FASTCGI and Lighttpd Slow

Added by Anonymous over 17 years ago. Updated about 16 years ago.

Status:
Invalid
Priority:
Urgent
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

Lately my server powered by Lighttpd has been acting very slow. FastCGI used to die and i upgraded to 1.4.15 from 1.4.13. This is the ERROR is used to receive on 1.4.13


2007-05-21 17:07:02: (log.c.75) server started 
2007-05-21 17:22:17: (server.c.1148) NOTE: a request for /forum/index.php?showtopic=51154 timed out after writing 13032 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-21 17:34:36: (server.c.1148) NOTE: a request for /forum/index.php?act=Login&CODE=00 timed out after writing 39928 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-21 17:34:54: (server.c.1148) NOTE: a request for /forum/index.php?act=Login&CODE=00 timed out after writing 12834 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-21 17:34:57: (server.c.1148) NOTE: a request for /forum/index.php?act=Login&CODE=00 timed out after writing 12834 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-21 17:38:06: (mod_fastcgi.c.2396) unexpected end-of-file (perhaps the fastcgi process died): pid: 9494 socket: unix:/tmp/php.socket.mydomain.com-0

I upgrade Lighttpd to 1.4.15 and now those ERROR are replaced by


2007-05-22 21:03:41: (log.c.75) server started 
2007-05-22 21:33:53: (server.c.1149) NOTE: a request for /forum/index.php?act=rssout&id=5 timed out after writing 13068 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 21:36:35: (server.c.1149) NOTE: a request for /forum/index.php?showtopic=51680 timed out after writing 13032 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 21:36:40: (server.c.1149) NOTE: a request for /forum/index.php?showtopic=51687 timed out after writing 13140 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 21:50:59: (server.c.1149) NOTE: a request for /forum/index.php?showtopic=51680 timed out after writing 12168 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 21:58:23: (server.c.1149) NOTE: a request for /forum/index.php?s=&autocom=shoutbox&code=ajax&type=shouts&ajaxkey=shouts&ids=24,23,22,21,20,19,18,17,16,15,14,13,12,11,10&time=1179856287&global=1&force=0&__=1179856297390 timed out after writing 12240 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:01:05: (server.c.1149) NOTE: a request for /forum/index.php?act=Reg&coppa_user=0&termsread=1&coppa_pass=1 timed out after writing 12708 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:01:22: (server.c.1149) NOTE: a request for /forum/index.php?s=3e0efaf2bf91bf4e20f81379cf929c13&showforum=12 timed out after writing 12420 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:06:58: (server.c.1149) NOTE: a request for /forum/ timed out after writing 12708 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:07:58: (server.c.1149) NOTE: a request for /forum/index.php timed out after writing 13140 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:08:31: (server.c.1149) NOTE: a request for /forum/index.php?showforum=12&prune_day=100&sort_by=Z-A&sort_key=last_post&topicfilter=all&st=30 timed out after writing 12420 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:09:46: (server.c.1149) NOTE: a request for /forum/ timed out after writing 12708 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:14:48: (server.c.1149) NOTE: a request for /forum/index.php?showtopic=51679 timed out after writing 13068 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:27:35: (server.c.1149) NOTE: a request for /forum/index.php?showtopic=51656 timed out after writing 13140 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:28:13: (server.c.1149) NOTE: a request for /forum/index.php?showtopic=51679 timed out after writing 13140 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:28:18: (server.c.1149) NOTE: a request for /forum/index.php?s=&autocom=shoutbox&code=ajax&type=shouts&ajaxkey=shouts&ids=first-load&global=1&__=1179857933256 timed out after writing 13140 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:28:41: (server.c.1149) NOTE: a request for /forum/index.php?showtopic=51679 timed out after writing 13140 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:33:47: (server.c.1149) NOTE: a request for /forum/index.php?showtopic=48433&hl=csi timed out after writing 13140 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:33:50: (server.c.1149) NOTE: a request for /forum/index.php?s=&autocom=shoutbox&code=ajax&type=shouts&ajaxkey=shouts&ids=25,24,23,22,21,20,19,18,17,16,15,14,13,12,11&time=1179858433&global=1&force=0&__=1179858443156 timed out after writing 13140 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle 
2007-05-22 22:46:25: (server.c.1149) NOTE: a request for /forum/index.php?act=rssout&id=6 timed out after writing 28240 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle

Whats wrong and how should i go about it>

-- Sukhdeep

Actions #1

Updated by Anonymous over 17 years ago

IS someone looking at this or not. Is this a DEAD project ??

Actions #2

Updated by Anonymous over 17 years ago

This is a free, open source, partly community driven project.
If you need a guaranteed response, pay for a project like LiteSpeed.

To answer your question :

2007-05-22 22:33:50: (server.c.1149) NOTE: a request for /forum/index.php?s=&autocom=shoutbox&code=ajax&type=shouts&ajaxkey=shouts&ids=25,24,23,22,21,20,19,18,17,16,15,14,13,12,11&time=1179858433&global=1&force=0&__=1179858443156 timed out after writing 13140 bytes. We waited 360 seconds. If this a problem increase server.max-write-idle

I thought the error was pretty much self-explanatory.
If this a problem increase server.max-write-idle
Since you're experiencing a problem, increase it!

How hard is adding a line like :

server.max-write-idle = 720

To the config file?

BTW, the error in 1.4.15 is the same as that of 1.4.13.
Nothing has changed.

-- Spencer Thang

Actions #3

Updated by Anonymous over 17 years ago

I just had this problem and it tooka while to debug, so for everyones benefit....

Its very likely a problem with your php script and NOT a problem with lighty
Usually your php is in some sort of infinite loop, for me it was because Id dropped a database field and it was erroring

Heres how to troubleshoot....

change your fast-cgi so theres only 1 php fcgi backend, this way we can be sure to debug the right instance

  1. ps fax
    22951 ? S 0:00 \_ /usr/local/bin/php
    22952 ? S 0:00 | \_ /usr/local/bin/php

Now get the PID were interested in, the bottom-most one (in this case its PID 22952)

Then attach to that process....

  1. strace -s 1024 -p 22952

Now fire a request at your webserver, and wait until you get a HTTP 500 in your browser

Then break out of strace

Scroll through the output and youll probably see the problem where the fastcgi is trying to output error messages. The fastcgi never returns, and eventually lighty will give up waiting for it (up to max-server-write-idle seconds)

Hope this helps!

-- Carpathia

Actions #4

Updated by Anonymous almost 17 years ago

make sure the value of max_execution_time in php.ini is less than server.max-write-idle:

in php.ini
max_execution_time = 30

in lighttpd.conf:
server.max-write-idle = 31

The problem is that lighty gives up on the request before php does. If php quits first lighty gets the FIN packet from php and everyone is happy.

Actions #5

Updated by Anonymous almost 17 years ago

On my installation, setting server.max-write-idle above max_execution_time doesn't eliminate the errors (though I my be getting fewer of this class. It's hard to say with a 1 week sample because I haven't been getting many of these lately). It may, however. keep the error from bogging the server down.

Mine is running much better now, but this wasn't the only change I tried.

Actions #6

Updated by stbuehler almost 17 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid

http://trac.lighttpd.net/trac/wiki/server.max-write-idleDetails

(mod_fastcgi.c.2396) unexpected end-of-file: your backend died - not our problem.

Actions #7

Updated by stbuehler about 16 years ago

  • Status changed from Fixed to Invalid
Actions

Also available in: Atom