I am running 10 shops on my server, and have setup APC with the recommended settings in apc.ini.
extension = apc.so #name dependent on your APC cache install [APC] apc.enabled = 1 # Turn APC cache on apc.optimization = 0 # Experimental keep off apc.shm_segments = 1 # Shared memory segments apc.shm_size = 128 # Max shared memory dependent on OS apc.ttl = 7200 apc.user_ttl = 7200 apc.num_files_hint = 1024 apc.mmap_file_mask = /tmp/apc.XXXXXX apc.enable_cli = 1 # Allow command line php to function apc.cache_by_default = 1 # Enabled, 0 for filters apc.max_file_size = 10M # Maximum cached file size apc.stat = 1 # 1 for dev, 0 for production, whether the source file is checked for mod date #apc.include_once_override = 1 # Use PHP5.3+ for include_once optimization
And it was working well with about 99% hits, and the sites seem to be working well. But at some point of time my
shm.size
became exhaust and all 100% of the memory was used. Which resulted in all the shops stop working showing error of memory pool on line 0.
Then I increased the size of that particular variable to 1GB which resulted in fully functioning all the webshops.
So my question is what is the optimized value of the shm.size to be set per webshop and if if I have 20 shops then SHOULD be value be increased by the multiple of 20.