0

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.

Ben Lessani
  • 5,174
  • 16
  • 37
ProDraz
  • 231
  • 1
  • 4
  • 10
  • 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

2 Answers2

1

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,

Ben Lessani
  • 5,174
  • 16
  • 37
1

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.

Clarence
  • 151
  • 2