Portal Home > Knowledgebase > Articles Database > Apache and php settings


Apache and php settings




Posted by hostyourdream, 04-08-2010, 02:36 AM
Hello Where all these settings are in the server? Which files? How can i adjust them for a high traffic forum with server specs: # 2x Intel Xeon Quad 5405 # 12GB Ram # 4 SAS Disks in Raid 10 # 1.000 Mbit port Unshared I am using Apache and Mpm Worker and Cpanel. -------------------------------------- KeepAlive=on KeepAliveTimeout=6 MaxKeepAliveRequests=1000 -------------------------------------- ServerLimit 60 MaxClients 60 -------------------------------------- StartServers 30 MinSpareServers 30 MaxSpareServers 30 MaxRequestsPerChild 1000 Thank you

Posted by ksv2nash, 04-08-2010, 06:42 AM
Hello, This settings you will be find in httpd.conf

Posted by vB-WP-Admin, 04-08-2010, 07:10 AM
Which forum software are you using?

Posted by PinGaz, 04-08-2010, 08:14 PM
this is httpd.conf settings. if you have dedicated server you can edit your apache configuration file which is httpd.conf .

Posted by hostyourdream, 04-13-2010, 11:07 AM
Yes i use a dedicated server and cpanel with Apache.

Posted by hostyourdream, 04-13-2010, 11:47 AM
What do you think is a good value for my "MaxKeepAliveRequests" ? Thank you

Posted by Website themes, 04-13-2010, 12:08 PM
Never configured for mpm worker before. My experience is limited to prefork. The options you have quoted in the first post are all related to mpm_prefork not mpm_worker. For example: maxspareservers is replaced by maxsparethreads in mpm_worker. Are you sure your using mpm_worker? Do an httpd -V as root to find out. Nevertheless I see a few things wrong here. 1000 seems to much for maxKeepaliverequests. Perhaps a few hundred instead. Like say 200? Max clients and server limit should be 100 per GB of memory in a control panel-less setup. You should go with 90/gb so it comes to around 1000. If your allocating significant amount of RAM for mysql query caching I would reduce maxclients accordingly. I would leave startservers, minspareservers and maxspareservers at the default value.

Posted by hostyourdream, 04-14-2010, 02:46 AM
Yes it is mpm worker. Where is the file with mpm worker settings? Maybe i was looking in another file. Thank you

Posted by transformer, 04-14-2010, 05:00 PM
you know what i did in this situation i went to website www.rentacoder.com and placed a bid so i can hire some coder and my website comes online and it works very well. Really!

Posted by ksv2nash, 04-15-2010, 05:26 AM
Hello, you need to put this in your httpd.conf for optimization KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 MinSpareServers 15 MaxSpareServers 20 StartServers 15 MaxClients 256 MaxRequestsPerChild 100 HostnameLookups Off

Posted by Website themes, 04-15-2010, 06:00 AM
No that is for mpm prefork and its a pretty bad config for a 12gb 8 core server. To the OP you make changes to apache config from within cpanel: http://www.cpanel.net/documentation/...irectives.html First make sure its mpm_worker by loggin in via ssh and doing a httpd -V. Find the section for and add your changes there.

Posted by ksv2nash, 04-15-2010, 06:03 AM
Hello For mpm worker you can add this # worker MPM # StartServers: initial number of server processes to start # MaxClients: maximum number of simultaneous client connections # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestsPerChild: maximum number of requests a server process serves StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0

Posted by Website themes, 04-15-2010, 06:36 AM
Max clients is too low. With 150 he will use only around 1.5 - 2 GB RAM at most. Since he has 12 GB ram he should keep max clients at a higher figure. Perhaps 1000. Also maxrequestsperchild should be a finite number to prevent wastage of RAM. Perhaps 2000.

Posted by ksv2nash, 04-15-2010, 06:40 AM
Hello, you can use these setting so your server will not take high load. StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 Thank you.

Posted by net, 04-15-2010, 08:13 AM
Moved > Hosting Security and Technology .

Posted by hostyourdream, 04-15-2010, 08:32 AM
In the php conf i have these: # Fastcgi configuration for PHP5 LoadModule fcgid_module modules/mod_fcgid.so MaxRequestsPerProcess 500 #MaxProcessCount 75 #IPCCommTimeout 240 #IdleTimeout 240 Are these ok or i must adjust them?



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Security Rating ? (Views: 668)
problem with pop3 (Views: 728)


Language: