Jump to content

Share your prefork settings if you have more tham 500 users online

Recommended Posts

All depends on the server and such and the amount of available memory.

It should look roughly like the following, Yet there is no need to mass change it as it could cause issues on rebooting.

<IfModule prefork.c>

StartServers 10

MinSpareServers 10

MaxSpareServers 20

MaxClients 256

MaxRequestsPerChild 10000


Before you even think about editing / adding the module you should look at the incoming apache connections:

netstat -nt | grep :80 | wc -l

As an example, If you have 500 and you maxclients is set to 256 then you will most likely trigger alot of apache spawns, They will look like:

/usr/local/apache/bin/httpd -k start -DSSL

Now unless you forced a ulimit, The only way to increase over the 256 would insert it in the the pre_virtual_host file. You would edit the following as an example:

pico /usr/local/apache/conf/includes/pre_virtualhost_global.conf

And include:

ServerLimit 2048

MaxClients 1000

Then restart apache with:

/etc/init.d/httpd restart

Now obviously the more you allow the more your server will accept more connections, But then this will probably increase the CPU / Memory, Possible I/O times too.
Link to comment
Share on other sites

Yes i have about 20 :

/usr/local/apache/bin/httpd -k start -DSSL

I do not have this:


In whm on apache include editor i have this:

Pre VirtualHost Include

Is it ok to add them there?

Also after all how can i know that the limits:

ServerLimit 2048
MaxClients 1000

Are pass to the server and now i use the new limits?

Thank you :)
Link to comment
Share on other sites

When you say you do not have this, Now that cmd window will open a blank page - You simply add there as there is no other configuration. All this does it place the settings before apache.

You cannot add those in the one via whm > Include editor, It simply will not work, The include is for script based meaning fcgi configuration and other modules you have installed, Its just forcing the settings for all users.

Link to comment
Share on other sites

Not a problem, Glad I could help but take note that the numbers above were an example for a high end box.

Do not blame me if you attempt to restart and your machine fails to reboot due to the amount of incoming allowed connections :P

Stick to around:

ServerLimit 1500

MaxClients 500

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...