-1

I wonder how I need to configure my apache configuration for a high traffic website which runs a forum mainly. We have up to 300k Unique visitors per day (total peak) and therefore we got a Dual Xeon, 64gb RAM Server.

In the past the hardware usage was fine, but the apache server was still overloaded, thus I think my apache configuration wasn't that good. Unfortunately I couldn't find a lot how I should configure my apache config for my purpose and CPanel didn't want to give any recommendations. I wonder especially about the right settings for Minimum Spare Servers, Maximum Spare Servers, Server Limit, Max Request Workers, Max Connections Per Child and Max Keep-Alive Requests.

Here is the according image what I can set in CPanel. I also changed to FastCGI at EasyApache, should I consider changing some specific CPanel options as well for my purpose?

enter image description here

kentor
  • 153
  • 1
  • 5
  • 10
  • There are no specific numbers. Every site is different. Though you would do well to get rid of cPanel. – Michael Hampton Aug 09 '15 at 18:35
  • Hm it was a pretty new decision to go with CPanel because we are not very experienced with webserver stuff and we were not able to find someone who would do it for us. Why is CPanel so bad and what values would you recommend round about? – kentor Aug 09 '15 at 18:36
  • There are plenty of people available at the right price. – user9517 Aug 11 '15 at 15:05

1 Answers1

2

I suppose your are on worker-mpm mode. At first you can increase the default values like this, considering your server / trafic :

ServerLimit 2000
ListenBacklog 500
StartServers          100
MinSpareServers       50
MaxSpareServers      100
MaxClients          2000

The default configuration is more for testing environment. You server limit is very low for exemple. You have a large amount of memory, use it.

Jérémy Munoz
  • 344
  • 2
  • 8
  • Does it make sense to set more StartServers than MinSpare Servers ? And what setting is MaxClients in my Screenshot/Cpanel ? – kentor Aug 10 '15 at 14:28
  • Yes if you have for some reason to restart the service during a spike workload. If there are unnecessary process it will decrease by itself. It should be Max request worker. Keep in mind that this configuration will not overloaded your server, it will just enable to handle more connections during a workload. It's just an example based on my experience and you have to test it by yourself. But your configuration is obviously undersized. If you had more than 500-750 current users (for a long time) on your website it will start to slow down with this configuration. – Jérémy Munoz Aug 10 '15 at 15:48
  • Ok thank you so far, could you refer to the screen which I have uploaded? There are also other configurations and I don't know what you mean by ListenBacklog and MaxClients because I can't specify these in CPanel. Thanks so far ! – kentor Aug 10 '15 at 21:08
  • ListenBacklog is the maximum length for pending connections. MaxClients is the maximum number of simultaneous clients you authorize before sending to the queue. That looks strange that you can't modify this setting on this panel. You can also modify the configuration file itself (using this https://documentation.cpanel.net/display/EA/Advanced+Apache+Configuration). Sorry i never did this with CPanel. – Jérémy Munoz Aug 11 '15 at 10:01