Knowledgebase

Apache 2.2 configuration

Posted by Insert, 05-12-2011, 03:54 PM
Hi, i have a server with 8x i7-2600 and 8GB ram and 1TB HD SATA 7200rpm(mysql run on a 250GB SATA 7200rpm separated) What better setting for apache on the following variables? MinSpareServers 5 MaxSpareServers 20 ServerLimit 1000 MaxClients 999 MaxRequestsPerChild 20000 KeepAlive On KeepAliveTimeout 5 MaxKeepAliveRequests 300 This server have 1500 domains and load average is 10.0 all day. top - 16:55:31 up 5:26, 2 users, load average: 3.35, 6.23, 7.67 Tasks: 405 total, 1 running, 401 sleeping, 0 stopped, 3 zombie Cpu(s): 17.2%us, 3.7%sy, 0.1%ni, 73.2%id, 5.7%wa, 0.0%hi, 0.1%si, 0.0%st Mem: 8221288k total, 6568836k used, 1652452k free, 525596k buffers Swap: 8385920k total, 0k used, 8385920k free, 4617872k cached # free -m total used free shared buffers cached Mem: 8028 6415 1612 0 513 4511 -/+ buffers/cache: 1390 6638 Swap: 8189 0 8189

Posted by Patrick, 05-12-2011, 04:23 PM
What PHP wrapper are you using? suPHP, FastCGI, CGI?

Posted by Insert, 05-12-2011, 05:11 PM
I am using suPHP

Posted by stardust_x7, 05-12-2011, 05:21 PM
Nearly 400 process you are running, you should check active connections : And set limit on per user max process to reduce abusive usage : /usr/local/apache/conf/includes/pre_main_global.conf It seems you already use correct apache configurations according to the specification, but your node seems quite loaded for resource consuming processes.

Posted by Patrick, 05-12-2011, 05:27 PM
The problem is mostly related to suPHP. It is a huge, huge CPU hog... we switched from suPHP to FastCGI and the load averages were cut by 75%! Unless your memory consumption is a problem, there's no real need to use suPHP when FastCGI does pretty much the exact same thing with equal security, but far better performance.

Posted by stardust_x7, 05-12-2011, 05:41 PM
Im using only "CGI" as PHP wrapper, I know peoples tell about security issues, but never faced any problem with 17+ nodes yet.

Posted by Insert, 05-12-2011, 06:37 PM
Patrick to use FastCGI only need to compile apache with FastCGI? Or need other configuration? You can create a step by step to change of suPHP to FastCGI please? I did this in the past but had no success.

Posted by Insert, 05-12-2011, 06:59 PM
I have disabled suPHP and enabled mod fastcgi on apache session, and fast cgi on php5 session, only this or need more settings? This is correct?

Posted by Insert, 05-13-2011, 01:34 AM
Hi, i have installed the FastCGI and work ok but after any minutes apache down and on error log show: mod_fcgid: Can't create shared memory for size Now increased it to 1GB shared memory of the server sysctl(kernel.shmmax = 1073741824) do not know if this will solve, someone already went through this? I am using also the eaccelerator with 256M cache.

Posted by Insert, 05-13-2011, 02:00 AM
Still: [Fri May 13 02:59:02 2011] [emerg] (28)No space left on device: mod_fcgid: Can't create shared memory for size 1167812 bytes [Fri May 13 02:59:12 2011] [emerg] (28)No space left on device: mod_fcgid: Can't create shared memory for size 1167812 bytes

Posted by Insert, 05-13-2011, 02:09 PM
Now increased the kern.ipc.shmall on /etc/sysctl.conf and resolved.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Search engine (Views: 582)


Language:

Client Login

Email

Password

Remember Me

Search