Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h2>solution for me:</h2> <ul> <li>apc.ttl=0 </li> <li>apc.shm_size=anything you want</li> </ul> <p><strong>edit start</strong></p> <h2>warning!</h2> <p>@bokan indicated me that i should add a warning here. </p> <p>if you have a ttl of 0 this means the every cached item can be purged immediately. so if you have a small cache size like 2mb and a ttl of 0 this would render the apc useless, because the data in the cache gets always overwritten.</p> <p>lowering the ttl means only that the cache cannot become full, only with items which can't be replaced.</p> <p>so you have to choose a good balance between ttl and cache size.</p> <p>in my case i had a cache size of 1gb, so it was more than enough for me.</p> <p><strong>edit end</strong></p> <p>had the same issue on centos 5 with php 5.2.17 and noticed that if the cache size is small and the ttl parameter is "high" (like 7200) while having a lot of php files to cache, then the cache fills up quite fast and apc doesn't find anything which it can remove because all files in the cache still fit in the ttl.</p> <p>increasing the memory size is only a part solution, you still run in this error if you cache fills up and all files are within the ttl.</p> <p>so my solution was to set the ttl to 0, so apc fills up the cache an there is allways the possibility for apc to clear some memory for new data.</p> <p>hope that helps</p> <p>edit: see also: <a href="http://pecl.php.net/bugs/bug.php?id=16966" rel="nofollow">http://pecl.php.net/bugs/bug.php?id=16966</a></p> <p>download <a href="http://pecl.php.net/get/APC" rel="nofollow">http://pecl.php.net/get/APC</a> extract and run the apc.php, there you have a nice diagram how your cache usage look like</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload