Lighttpd with wrong configuration?

Hi!

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
2264:

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

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

My configuration is the following:

server.modules              = (
                               "mod_rewrite",
                               "mod_redirect",
                                "mod_access",
                               "mod_fastcgi",
                                "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"
server.network-backend = "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

Regards

admin112Asked:
Who is Participating?
 
wildzeroConnect With a Mentor Commented:
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.
0
 
admin112Author Commented:
Hi!

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).

0
 
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.
0
 
admin112Author Commented:
thanks for your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.