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


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.2.0 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.19>

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 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
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


> <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.4 32 bit - Apache 2.4.46a - PHP 8.0.0…5.6.40 - MySQL 5.7.32 - MariaDB 10.5.8
Wampserver 3.2.4 64 bit - Apache 2.4.46a - PHP 8.0.0…5.6.40 - MySQL 5.7.32/8.0.22 - MariaDB 10.5.8
PhPMyadmin 5.0.4 - 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.