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: Windows Apache issues with high Server loads peak times |
|
Author |
|
matrixebiz
Joined: 27 Sep 2017 Posts: 26
|
Posted: Thu 01 Feb '18 16:15 Post subject: Windows Apache issues with high Server loads peak times |
|
|
Hello, can anyone recommend some better settings to allow Apache to handle high Server loads when I have thousands of users accessing the server at once streaming (HLS/m3u8) off the server? The server itself isn't under stress. CPU and Ram usage is still low so it's not a server resource issue but seems to be that Apache can't handle so many small file requests per second. So pinging gets time outs. etc...
My settings are;
httpd.conf
KeepAlive Off
httpd-mpm.conf
<IfModule !mpm_netware_module>
PidFile "logs/httpd.pid"
</IfModule>
# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxConnectionsPerChild: maximum number of connections a server process serves
<IfModule mpm_winnt_module>
ThreadsPerChild 1000
MaxConnectionsPerChild 10000
</IfModule>
Thank you |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7288 Location: Germany, Next to Hamburg
|
Posted: Thu 08 Feb '18 16:06 Post subject: |
|
|
KeepAlive on to save the conntection state.
Also "MaxConnectionsPerChild" to 0 (zero) so apache doesn#t need to restart the child process.
KeepAlive on
EnableMMAP off
EnableSendfile off
Win32DisableAcceptEx on
MaxConnectionsPerChild 0 |
|
Back to top |
|
matrixebiz
Joined: 27 Sep 2017 Posts: 26
|
Posted: Thu 08 Feb '18 20:07 Post subject: |
|
|
Hi James, I thought KeepAlive will keepalive connections to specific users (one connection state) for long times so I thought I need to drop them as soon as possible when they are done downloading one file to free up as many processes as possible so the next person is not waiting for a free process. Also, with MaxConnectionsPerChild, I read that this may cause some processes (connections) to memory leak and get stuck, is this also incorrect?
Currently on medium load looking at the server stats this is what I have;
94.9 requests/sec - 24.2 MB/second - 261.2 kB/request
310 requests currently being processed, 690 idle workers
Does that mean ThreadsPerChild = 310?
I want to see what it says when under high loads later.
EDIT: When I turned on;
#EnableMMAP off
#EnableSendfile off
#Win32DisableAcceptEx on
The Apache Service would not start. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7288 Location: Germany, Next to Hamburg
|
Posted: Fri 09 Feb '18 10:25 Post subject: |
|
|
KeepAlive is not the connection state, but the client can reuse the connection without reestablish new one.
ThreadsPerChild = 310 means that your server uses 310 Childs / threads. The other 690 do nothing (more or less usless threads).
The memory leak can not be confirmed. That was in the older days. Or maybe if you use a faulty 3rd party module that blows up apache. That is my many members of this forum replaced mod_php with php over fcgid.
Apache doesn't start with the other settings. okay, what is in your logs about it? |
|
Back to top |
|
|
|
|
|
|