Search code examples
httpd.confapache2.2fastmm

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,


Solution

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