Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Apache going down

server reached MaxClients setting, consider raising the MaxClients setting

10:16 am on Oct 6, 2007 (gmt 0)

10+ Year Member

My VPS is up going down more often than the proverbial hores ..... and I'm a newbie to apache

WHile trying to pin down the problem

In /var/log/httpd/error.log

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pgsql.so' - libpq.so.4: cannot open shared object file: No such file or directory in Unknown on line 0

The file pgsql.so is present, and the "No such file or directory in Unknown on line 0" has me baffeled

My main consern is the following.
[error] server reached MaxClients setting, consider raising the MaxClients setting

Followd by..
[notice] caught SIGTERM, shutting down

The httpd.conf entries are:-

<IfModule prefork.c>
StartServers 1
MinSpareServers 1
MaxSpareServers 5
ServerLimit 10
MaxClients 10
MaxRequestsPerChild 4000

<IfModule worker.c>
StartServers 2
MaxClients 10
MinSpareThreads 1
MaxSpareThreads 4
ThreadsPerChild 25
MaxRequestsPerChild 0

Can anyone give me any help, should these settings be changed? if so how should I work out what these should ideally be 20 - 50 - 250? and if I increase the MaxClients should any of the others be increased.

Thank you for your time.

For you infomation

Virtual private server CP Plesk 8.2
Operating System

Applications Installed
devel-fc4-x86_64 / 20060804
fc4-x86_64-custom-config / 20061205
fc4-x86_64-psa8-key / 20061205
fc4-x86_64-psa8-language / 20061205
mod_perl-fc4-x86_64 / 20060411
mod_ssl-fc4-x86_64 / 20060804
mysql-fc4-x86_64 / 20060804
php-fc4-x86_64 / 20060220
psa-bu-fc4-x86_64 / 20060614
psa-fc4-x86_64 / 20060614
psa-vault-fc4-x86_64 / 20060611

At the moment the...
Memory Usage
Total Used Free Shared Buffer Cached Usage
3.85 GB 3.77 GB 76.82 MB 0 B 333.30 MB 1.17 GB 67.66%

Swap usage
Total Used Free Usage
18.63 GB 31.42 MB 18.60 GB 0.16%

Hard Disk Usage
Filesystem Total Used Available Capacity
/dev/vzfs 9 765.63 MB 3 028.43 MB 6 737.19 MB 31.01%

The site has 60+ static pages and runs a phpbb forum plus bbclone

usage for September was
Total Hits 3180798
Total Files 1868354
Total Pages 618000
Total Visits 63839
Total KBytes 22532721 ....so not a very busy site

3:47 am on Oct 20, 2007 (gmt 0)

5+ Year Member

I am having the same problem, so I would be very interested in how you were able to resolve this.

We recently switched our site from html to php with use of includes, but not much in the way of scripts or increases in traffic.

4:30 am on Oct 20, 2007 (gmt 0)

5+ Year Member

First figure out how much RAM each Apache process uses. Then, take the total amount of free RAM you have available, subtract a little bit for other processes to use as necessary, then with the remainder divide it up to figure out how many more clients you can add to MaxClients.

Example: Apache uses 500K per process. You have 70MB free RAM. You need 20MB for other processes to fluctuate. That leaves 50MB free RAM. So then 50MB divided by 500K equals about 100. So in theory you could add another 100 to MaxClients.

I run a 2GB RAM dual core system with Apache2, MySQL 5, Ruby on Rails, Mongrel, Postfix, Spamassassin, Clamv, popa3d, FTP server, and the other usual server stuff and I have MaxClients set to 150.


Featured Threads

Hot Threads This Week

Hot Threads This Month