I have APC installed and it is causing Apache to shutdown once MaxRequestsPerChild is reached. I came to this conclusion after load testing and checking the error log.
Under load testing, with a low MaxRequestsPerChild (e.g., 100-250) i get the errors below. However, if i set MaxRequestsPerCHild to no limit (0), i do not get the errors. I do not want to leave this setting to 'no limit' though.
Has anyone come across this situation before and found an explanation or fix? I would like to keep using APC but if this bug is a valid one it will be a showstopper.
ANy help and input much appreciated.
Environment
httpd.conf (part)
MaxRequestsPerChild 0
MaxKeepAliveRequests 250
KeepAlive On
KeepAliveTimeout 2
EnableMMAP off
EnableSendfile off
Win32DisableAcceptEx
APC settings
extension = php_apc.dll
apc.enabled = 1
apc.shm_segments = 4
apc.shm_size = 128
apc.optimization = 0
apc.num_files_hint = 1000
apc.ttl = 0
apc.gc_ttl = 3600
apc.cache_by_default = On
apc.slam_defense = 15
apc.file_update_protection = 2
apc.enable_cli = 0
apc.stat = 1
apc.report_autofilter = 1
apc.user_ttl = 600 ; seconds
Load Test
error.log
[notice] Server built: Sep 6 2006 12:52:38
[notice] Parent: Created child process 7556
[notice] Disabled use of AcceptEx() WinSock2 API
[notice] Child 7556: Child process is running
[notice] Child 7556: Acquired the start mutex.
[notice] Child 7556: Starting 150 worker threads.
[notice] Child 7556: Listening on port 80.
[notice] Child 7556: Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.
[notice] Parent: Received restart signal -- Restarting the server.
[apc-error] apc_shm_detach: shmdt failed: No error
[notice] Child 7556: Released the start mutex
[notice] Child 7556: Waiting for 150 worker threads to exit.
[notice] Child 7556: All worker threads have exited.
[Mon Sep 25 16:37:19 2006] [notice] Child 7556: Child process is exiting