Disable or Remove APC

alternative-php-cache

I am too frustrated with PHP APC caching system and I wanted to remove/disable it completely from my server. I am using PHP with Nginx installed on Debian Squeeze, is there any way of doing it ?

Best Answer

Instead of removing APC, which will cause a massive performance hit, and effectively shoot yourself in the foot..

Try this: in /etc/php5/conf.d/apc.ini:

extension=apc.so
apc.shm_size=128M
apc.shm_segments=1
apc.max_file_size=5M
apc.num_files_hint=10000
apc.slam_defense = 0
apc.write_lock=1

You can increase apc.shm_size to a value bigger than 128, say 512 if you had sufficient free RAM.

I did this on a server I run, and never ever see Unable to allocate memory for pool errors.

Related Topic