Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Too many apache processes |
|
Author |
|
Hypnotize
Joined: 20 Jun 2016 Posts: 1
|
Posted: Mon 20 Jun '16 16:32 Post subject: Too many apache processes |
|
|
Hi all
I'm running a Centos 7.2 server with Apache version 2.4.6, with 6gb of ram and with Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz, 2 cores processor.
After I start apache webserver, with four wordpress sites, apache takes almost all of my ram memory and cpu, but it varies from time to time. Sometimes it takes around 1,5gb of ram and 40% cpu, but sometimes it takes all of my ram and 94% of cpu, and there are around 20 or even more of these processes :
/usr/sbin/httpd -DFOREGROUND
Taking all of ram and cpu.
After all ram i taken , mysql server crashes.
This is my httpd.conf file :
http://apaste.info/gg6
I have tried to limit processes by adding , :
<IfModule mpm_prefork_module>
StartServers 2
MinSpareServers 2
MaxSpareServers 5
MaxClients 50
MaxRequestsPerChild 0
</IfModule>
But without of success,and prefork module is enabled.
Thanks in advance |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 25 Jun '16 22:21 Post subject: |
|
|
Well that is a correct behavior. You set apache to start with 2 parent processes. If not enough than start up to 3 more. Each parent starts 50 child processes to handle the connections. If you would use htop ( in tree view) you could see that.
See also https://httpd.apache.org/docs/2.4/en/mod/prefork.html
if you still have a question please ask again. |
|
Back to top |
|
|
|
|
|
|