PHP memory problems on Apache 2

We’ve gotten several problems of memory leaking with MidCOM used with PHP4 and Apache2 on both Fedora and Debian platforms. At first memory leaks on Midgard 1.7 were suspected, but after extensive testing this theory was discarded.

Then we received reports of similar problems on Moodle running on Apache 2, which seems to point at some specific PHP function utilized by both leaking.

Good ideas about which function this is would be appreciated, but before that it is possible to work around the issue by setting MaxRequestsPerChild in <IfModule prefork.c> to about RAM/10. For example:

MaxRequestsPerChild 67

Thanks to Jarkko for seeking out the issue on non-Midgard systems! I’ll be sure to post details as soon as we find out what function causes this.

Written in the pleasant WiFI-equipped Cafe Sans Souci in Tbilisi Old Town.

Updated 2005-10-12: Some additional memory leaks were found and fixed in Midgard 1.7.2. This should improve the situation.

Read more Midgard posts.