Apache 2.2.11/Subversion memory leak
We are running a small-medium site with about 150 svn projects in a old server windows 2003/apache 2.2/svn 1.6.6. Some users reported us that the SVN server goes down. Something is wrong with the svn server: from time to time the apache service starts hogging memory and it dies with only a message:
[crit] Parent: child process exited with status 3 -- Aborting.
[info] removed PID file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid (pid=1436)
It’s not really critical if you configure the service to restart on error, but it’s annoying enough to do some further research.
Monitoring shows that free memory starts to run out of memory and when exhausted, apache process dies with the message below. Apache and SVN modules are 32-bits (because there is not svn modules available for win64 AFAIK), so … as apache in windows runs as a single process and spawns child threads the total memory available for apache process is limited to 2Gb. Despite the 2G limitation monitoring shows that there is enough free memory during normal operation.
The strategy behind the above settings is to limit the life of each thread, so that if there are memory leaks, the memory gets released when the threads are killed.
In my case, settings are:
Each thread can use to 8Mb before releasing, and service up to 200,000 requests before being killed. And, of course, swith to linux apache-subversion as soon as possible.