Apache launches a lot of processes

ArobasHost

Verified User
Joined
Mar 17, 2008
Messages
5
Location
Casablanca
Hello,

I have two major sites that receive up to 12.000 guests a day, so when i have up to 400 guests connected at the same time my apache launches a lot of processes and my CPU is begin used for up to 100% and my Swap RAM too, then my server becomes so slow and it plant.

I'm trying to restart apache every 5-10 minutes to keep it working fine, I also added a line in my crontab to restart apache every 10 minutes automatically.

What can you suggest me to do to fix this ? :(

Thanks in advance :D
 
Restarting apache does nothing more then kick established connections it is pointless. The server load will just drive back up when they refresh their browsers. If your hardware cannot handle the clients then get a better machine.
 
I have a good machine, that's not the problem.

I got a Quad Core 6600 2.40GHz, 4 Mo Cpu cache and 2 Go of RAM.
Apache is loading much, so that's not normal.

Some friends told me that i have to optimize my apache config as well...
What's the best apache config will go well with my machine ?

Processors 4
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
CPU Speed 1.6 GHz
Cache Size 4.00 MB
System Bogomips 19202.8
 
2 gig ram isn't much. Check to make sure that your not over using it.

What version apache do you use?

Do you use customapache or custombuild?

Your settings are either at the top of httpd.conf or in /etc/httpd/conf/extra/httpd-mpm.conf

Try increasing some values like the following ones:

StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
 
Hi again chatwizrd,

Currently i'm using the 2.0.63 version and PHP 5.2.5 with Zend Optimizer and eAccelerator.

=======================================================
PHP 5.2.5 (cli) (built: Mar 9 2008 04:07:48)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with eAccelerator v0.9.5.2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
=======================================================

And i'm using customapache, my settings are in httpd.conf
I tryed a lot of configurations values, you can view my actual config at http://www.arobashost.net/apache/httpd.conf

You can view also my MySQL config file by remplacing httpd.conf at the end of the url with my.cnf and the php config php.ini

Mysql caused some problems too i had some errors before like max_connections and max_user_connections, but i think that's fixed now.

The server is working fine atm, there is no many guests connected at the same time now, even if i change something on my apache config i can't know if it's okey :D I have to wait the peak time.
still 12:00 PM to 2:00 PM and 6:30 PM to 9:00 PM, when i'm getting up to 450 guests connected at the same time so
 
Last edited:
Hi again chatwizrd,

Currently i'm using the 2.0.63 version and PHP 5.2.5 with Zend Optimizer and eAccelerator.

=======================================================
PHP 5.2.5 (cli) (built: Mar 9 2008 04:07:48)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with eAccelerator v0.9.5.2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
=======================================================

And i'm using customapache, my settings are in httpd.conf
I tryed a lot of configurations values, you can view my actual config at http://www.arobashost.net/apache/httpd.conf

You can view also my MySQL config file by remplacing httpd.conf at the end of the url with my.cnf and the php config php.ini

Mysql caused some problems too i had some errors before like max_connections and max_user_connections, but i think that's fixed now.

The server is working fine atm, there is no many guests connected at the same time now, even if i change something on my apache config i can't know if it's okey :D I have to wait the peak time.
still 12:00 PM to 2:00 PM and 6:30 PM to 9:00 PM, when i'm getting up to 450 guests connected at the same time so
No one had/have the same problem ? :(

So i had keepalive ON i turned it Off and it's much better now, had EnxtendedStatus ON too and turned it off also, but the server is still getting down/slow at least one time or two times a day.

This make me sick.
Your help will be much very appreciated :)


Best Regards,
AMINE.
 
Unfortunately, tuning apache for a high-usage website is a fine art, and while we try to be helpful here, this may not be the best place to address it.

I'd suggest finding and writing on an apache2 users' forum.

Jeff
 
My problem was resolved by adding 2 others dedicated for my hosting company to separate that web sites :)

Just one more question please... my Duo Core Quad 6600 4Mo of memory cache and 4 Go of RAM can host that big websites without any problem if apache was customized correctly to support them ?

And thanks for your answer Jeff


Best Regards,
AMINE EL MAHI
 
Same answer for this time; I wish I had more info but I've spent years doing shared hosting. Next year I'll probably be working on a cluster for a large site; if I do, you'll see my questions on the right forums :).

Jeff
 
Back
Top