Are you using cumuluswebtags.php?
Posted: Wed 27 Jan 2016 1:20 pm
If so, you may be interested in the following...
On my shared web host (actually Steve's server) I started getting warnings in the PHP error log along lines of "PHP Warning: Unknown: Unable to allocate memory for pool." when including PHP scripts within the main script.
This was traced to the Alternative PHP Cache (APC) module on the server, which caches PHP scripts in memory, this was running out of memory, and the memory usage was really badly fragmented.
Increasing the memory allocation relieved the situation, but I noticed that the cumuluswebtags.php file was being cached multiple times - often with zero hits.
Caching the web tag file is a bad idea, as it frequently changes, it is re-cached every time a modified version is accessed. This can actually slow down the access time. It is better if fast changing files such are these are excluded from the cache altogether.
The solution was to add an exclusion to the apc.ini configuration file, the entry we used was as follows...
This excludes the standard cumuluswebtags.php file, and also two additional files I use on my website; cumuluswebtagsRealtime.php and cumuluswebtagsMonthly.php.
Since doing this the APC memory usage has dropped, and the cache fragmentation has dropped to virtually zero (well actually zero so far!). And no more warnings in the error log.
If you use the cumuluswebtags.php file and your server uses APC for PHP caching I strongly recommend you look into implementing an exclusion filter.
On my shared web host (actually Steve's server) I started getting warnings in the PHP error log along lines of "PHP Warning: Unknown: Unable to allocate memory for pool." when including PHP scripts within the main script.
This was traced to the Alternative PHP Cache (APC) module on the server, which caches PHP scripts in memory, this was running out of memory, and the memory usage was really badly fragmented.
Increasing the memory allocation relieved the situation, but I noticed that the cumuluswebtags.php file was being cached multiple times - often with zero hits.
Caching the web tag file is a bad idea, as it frequently changes, it is re-cached every time a modified version is accessed. This can actually slow down the access time. It is better if fast changing files such are these are excluded from the cache altogether.
The solution was to add an exclusion to the apc.ini configuration file, the entry we used was as follows...
Code: Select all
apc.filters="cumuluswebtags.*php"Since doing this the APC memory usage has dropped, and the cache fragmentation has dropped to virtually zero (well actually zero so far!). And no more warnings in the error log.
If you use the cumuluswebtags.php file and your server uses APC for PHP caching I strongly recommend you look into implementing an exclusion filter.