logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Too many apache processes
Author
Hypnotize



Joined: 20 Jun 2016
Posts: 1

PostPosted: Mon 20 Jun '16 16:32    Post subject: Too many apache processes Reply with quote

Hi all Smile

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 Smile
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 25 Jun '16 22:21    Post subject: Reply with quote

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


Reply to topic   Topic: Too many apache processes View previous topic :: View next topic
Post new topic   Forum Index -> Apache