Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache memory leak

I am using Apache 2.2 on Windows and I can see steady increase in memory for httpd process. I used FastMM memory manager to find memory leaks and while I found some and cleared them and while FastMM is not finding anything anymore, my httpd memory still keeps increasing until it reaches ~2GB cap and crashes.

What are some good strategies / tools to deal with such situations?

This is not a website and there is no PHP involved. We have our custom Apache module (.so) which acts as a server handling SOAP requests that can do inserts, deletes, updates, queries on database. Requests are coming from barcode scanning devices.

Much appreciated,

like image 482
pixel Avatar asked Mar 10 '26 12:03

pixel


1 Answers

This is a problem with Apache and also happens with version 2.4 for Windows. Easy fix is to set the MaxRequestsPerChild setting in the http default conf file in extra to a number between 200000 and 1000000, in the Windows section at the bottom of that file, and restart Apache. Memory usage still climbs but it resets itself automatically before the usage climbs high enough to crash the server. HTH.

like image 199
Graphic Equaliser Avatar answered Mar 14 '26 15:03

Graphic Equaliser



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!