Provide feedback on the IBM HTTP Server forum on IBM developerWorks.
AIX, any configuration
Append the following configuration to IHSROOT/bin/envvars
unset MALLOCMULTIHEAP MALLOCTYPE=buckets export MALLOCTYPE
z/OS with SSLClientAuth configured
Linux, with ThreadsPerChild > 100
If a growth of both RSS and VSZ can be demonstrated, it's important to verify that the memory usage never flattens out after many tens of thousands of hits. Any report of a memory leak must show both RSS and VSZ, for a fixed set of processes, over time.
MaxMemFree
directive can be used to limit the
amount of memory set aside. Setting this value too low (0, 128, 256) causes some extra CPU usage as
each thread must fight contention in the native heap library when it needs additional memory.
If this has an effect on your memory leak, it implies the memory being leaked is "APR pool memory", and not native heap memory, which can help identify the culprit.
Setting MaxRequestsPerChild
to a non-zero value (e.g.
10000) causes IHS child processes to routinely be cleaned up, which can
alleviate the impact of slow memory leaks.
The following steps are required to help suppport identify the cause of a memory leak. When opening a PMR, be sure to illustrate which (if any) of the diagnostic steps have been taken and their impact on the symptom.
MaxMemFree 0
(see above) and see if there is any change in behavior.
mod_memuse is a server module that identifies requests during which the total server memory use increased. Usage:
127.0.0.1 - - [26/Jan/2011:09:01:23 -0500] "GET /index.html HTTP/1.1" 200 23 M1284:5a2 127.0.0.1 - - [26/Jan/2011:09:01:23 -0500] "GET /index.html HTTP/1.1" 200 23 -where "M1284:5a2" means that the child process with pid 1284 increased by 0x5a2 bytes during the processing of that request, while "-" means the total process memory usage did not change during that request.
Note that this shows that the total process memory usage increased while the server was processing that request, but not necessarily that that request caused the increase.
To identify which requests tend to trigger increases in memory usage, perform the following steps:
MaxRequestsPerChild
is set to 0.
MaxSpareThreads
is set to the value of MaxClients
MaxMemFree
, e.g. 64 (kilobytes)
mod_memuse is available only from IBM HTTP Server L3 support.