Apache Lounge


About Forum Index Downloads Search Register Log in  RSS Apache Lounge  

Keep Server Online

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



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: apache performance issues

Joined: 24 Mar 2018
Posts: 2
Location: UK, London

PostPosted: Wed 12 May '21 0:06    Post subject: apache performance issues Reply with quote

im having severe issues on a server running apache 2.4.6 on centos.
Im running in prefork mode and during high load i can see the processes running in centos are very high and within just a couple of minutes a lot of httpd processes are started.

I have these values configured for prefork

StartServers 40
MinSpareServers 25
MaxSpareServers 100
ServerLimit 600
MaxRequestWorkers 500
MaxConnectionsPerChild 500
KeepAliveTimeout 2

Hardware resources are ok, CPU and MEM are low usage. I cant see any errors in apache log either, clients suddenly cant connect and receive timeout errors.

Any ideas on what might be wrong or needs to be tuned?
Back to top

Joined: 16 Aug 2020
Posts: 108
Location: UK

PostPosted: Wed 12 May '21 21:47    Post subject: Reply with quote

Is there a specific reason you're using pre-fork over worker or event MPM's?

The latter two are more efficient under high loads.
Back to top
James Blond

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

PostPosted: Wed 12 May '21 21:50    Post subject: Reply with quote

Disable the apache status module that is a great boost.
Use worker or event mpm (Both don't run with mod_php, but you can use mod_fcgid for PHP).
Disable DNS lookups.
Enable mod_h(ttp)2 if you can.
Enable and configure mod_deflate.

MaxConnectionsPerChild 500

Why do you kill a child that often? Every 500 requests the parent process will kill a child process and create a new one. That takes time and resources.
Back to top

Reply to topic   Topic: apache performance issues View previous topic :: View next topic
Post new topic   Forum Index -> Apache