Apache Memory Consumption
Posted by: sandrino (---.adsl-wholesale.clienti.tiscali.it)
Date: November 06, 2019 12:38PM

Hi, I just upgraded my site to wamp 3.1.9, using Apache 2.4.33, MySql 5.7.21, PHP 7.2.4. I did not change any default configuration setting, other than those needed to run vhosts and ssl.
Even though the site has not a very heavy load, I see that Apache is using, and never releasing, about 10% more memory a day. ( the site handles charity projects )
I could not find any hint on this issue directly related to wamp 3 on Windows.
I can give any detail about configuration. I found some hints about MPM and MaxClients, but the standard httpd.conf does not include any MPM module.
Would you please be so kind to lend a hand?
Thanks in advance

Options: ReplyQuote
Re: Apache Memory Consumption
Posted by: RiggsFolly (Moderator)
Date: November 06, 2019 02:44PM

Hi,

So which of the subsystems did you change. I mean did you change the versions of Apache/MySQL/PHP that you were using?


Remember the version of WAMPServer does not necessarily have to change the versions of the subsystems.

So one test would be to switch the versions of Apache/MySQL/PHP back to what you were using before, if that reduces the memory back to previous usage, then change one piece at a time to see what causes the memory usage to increase again.

Once we know what might be causing the increase we can start to look at why.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.1.9 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.16>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Apache Memory Consumption
Posted by: sandrino (---.adsl-wholesale.clienti.tiscali.it)
Date: November 08, 2019 02:58PM

Sorry for the delay, there was a functional problem to solve.
The answer to the question is: all of them.
The old system used to run on Wamp 2.2, Apache 2.2.21, PHP 5.3.10, MYSQL 5.5.20.
The reason we had to do such a dangerous step is that Apache 2.2 does not support newer TLS protocols, which are due to be withdrawn in early 2020.
We are a volunteering org. and we have very few resources to maintain the site. In these conditions there is no way to go back to old versions, so we must go on with the new ones.
I just tested the activation of mod_status, and in a few day I'll be able to give details about the load on system.
Thank you for now, I'll reopen the issue as soon as I have significant data.

Options: ReplyQuote
Re: Apache Memory Consumption
Posted by: sandrino (---.adsl-wholesale.clienti.tiscali.it)
Date: November 15, 2019 11:52AM

I believe I solved the problem by setting a couple of values in httpd.conf.
The settings are as shown below:

<IfModule mpm_winnt.c>
ThreadsPerChild 50
MaxRequestsPerChild 10000
</IfModule>
I am monitoring the system in order to fine tune the above values.
The first one defines the number of listening threads httpd.exe starts, saves the amount of "pre-allocated" memory, and must be set according to the site load.
The second one is more interesting. It sets the maximum number of incoming requests the ( only, in Windows ) child httpd.exe can accept. Once this limit is reached the incoming requests will be routed to a newly created httpd.exe child, while the old one will complete its current ones, and will exit, freeing its allocated memory.
It must be noted that, during this process, there is no interruption of service. This way, any memory leak is restored.

Options: ReplyQuote
Re: Apache Memory Consumption
Posted by: Otomatic (Moderator)
Date: November 17, 2019 11:36AM

Hi,

> <IfModule mpm_winnt.c>
> ThreadsPerChild 50
> MaxRequestsPerChild 10000
> </IfModule>

You do not need to use the <IfModule structure, because with Apache for Windows, the "mpm_winnt" module is an integral part of the Apache core and is therefore always loaded.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.0 32 bit - Apache 2.4.41 - PHP 7.4.0/7.3.12/..../5.6.40 - MySQL 5.7.28 - MariaDB 10.4.11
Wampserver 3.2.0 64 bit - Apache 2.4.41 - PHP 7.4.0/7.3.12/..../5.6.40 - MySQL 5.7.28/8.0.18 - MariaDB 10.4.11
PhPMyadmin 4.9.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.