Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Red Hat 6 and I've installed Lighttpd + MySQL and at the moment in getting 500 internal server error, logs shows that I have arround 2000 requests / sec, while as soon as requests drop below 1000 websites starts to load again.

I wonder how can I increase this limit.

My machine have 20 CPU's, 128GB RAM, so I doubt it's machine problem :S

I use FastCGI, while website is in PHP language.

share|improve this question
You need to give us a bit more. I you use MySQL you probably have a dynamic laguage. PHP? Python? Ruby? Connected via FastCGI over. TCP? File Socket? Add a few error lines of your log. Add a few important config parts (workers). – Christopher Perrin Sep 30 '12 at 13:20
I'm curious about the mathematics -- how did you end up with exactly 20 CPUs? – jgoldschrafe Sep 30 '12 at 15:02

Your bottleneck is PHP, not Lighttpd.

What are you testing, a static page with a echo "Hello World" or something more complex?

And just because you have 20 cores and 128GB of RAM doesn't mean anything if the userspace apps and OS aren't configured to take advantage of it,

share|improve this answer

Does this mean that you did not configure fastcgi at all?

PHP_FCGI_CHILDREN and PHP_FCGI_MAX_REQUESTS should be the values you tweak as soon as you set your hands on a new fcgi server. Do not that setting max children to a very high level may very well prove better in a short benchmark but result in your currently running scripts consuming more than your maximum memory at some point - so when you benchmark - do it with real scripts and keep it up for a bit while you monitor the status of the machine.

When you also haven't given any information about the scripts you run - it's impossible to say where the bottleneck could be. It could be I/O wait for MySQL by badly utilizing caches, or heavy/badly written php scripts, or alot of other stuff.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.