Lighttpd with wrong configuration?


I´m running a webserver with Lighttpd 1.4.20 (RPM) + PHP 5.1.6 (fastcgi + rpm) over Linux Centos 5.2 64 Bits in a Dell PowerEdge R200 server (Xeon Dualcore 3065, 4 GB RAM, 2X146 GB SAS 15.000 RPM) in a web site of Music (Flash players playing MP3 Files). It handles 170 Mbit of traffic with the following requests at this moment:

# netstat -an |grep :80 |wc -l

# netstat -an |grep :80 |grep TIME_WAIT |wc -l

* Some days, it achieves 4500-5500 petitions with a lot of Time Wait.

My configuration is the following:

server.modules              = (
                                "mod_accesslog" )
server.document-root        = "/var/www/goear/"
server.max-connections = 7000
server.max-fds = 21000
server.max-worker = 30
#server.max-request-size        = 30000
server.max-write-idle = 7200
server.max-read-idle = 10
server.max-keep-alive-requests = 0
server.max-keep-alive-idle = 0
#server.use-noatime = "enable"
server.event-handler = "linux-sysepoll" = "linux-sendfile"

fastcgi.server             = ( ".php" =>
                               ( "myip" =>
                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                   "bin-path" => "/usr/bin/php-cgi",
                                   "max-procs" => 10,
                                   "bin-environment" => (
                                     "PHP_FCGI_CHILDREN" => "16",
                                     "PHP_FCGI_MAX_REQUESTS" => "5000"

I got a lot of this errors and php-cgi zombie process:

2008-11-12 19:54:48: (mod_fastcgi.c.2956) backend died; we'll disable it for 5 seconds and send the request to another backend instead: reconnects: 0 load: 9
2008-11-12 19:54:48: (mod_fastcgi.c.2709) child died somehow, waitpid failed: 10

Some idea about of it?

Thanks in advance


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

How much ram you using at the moment, is it swapping? How much is each lighthttpd process / child using? Are you trying to generate to many which is just dying.

Is there any database activity? Could it be drying due to poorly optimized queries taking to long to return results?

Sorry haven't had a good look over just heading out.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
admin112Author Commented:

Now it is the usage:

  1  [###################*******************************100.0%]     Tasks: 394 total, 16 running
  2  [################**********************************100.0%]     Load average: 38.12 36.86 36.32
  Mem[||||||||||#***********************************692/3948MB]     Uptime: 2 days, 16:52:01
  Swp[|                                               6/1027MB]

My configuration has changed a bit, however site is now even fast than before. I noticed that using a phpinfo.php is slow too, only HTML files are fast. SQL queries could be even more optimized, but Mysql is not using almost resources (is a Quad core box, 8 GB RAM).

admin112Author Commented:
My system was causing low performance due to a low parameter in readahead for raid´s (default of 256 in centos and rhel). Changing to the deadline elevator was also of help.
admin112Author Commented:
thanks for your help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.