APC Cache files expire Issue with FastCgi

ahmedeqbal

Registered
Mar 13, 2014
1
0
1
cPanel Access Level
Website Owner
Hello,

we have properly installed APC cache on our WHM based server, we have set to expire each file in few hours, but all cached file lost in few seconds.

Our APC Settings:


apc.cache_by_default 1
apc.canonicalize 1
apc.coredump_unmap 0
apc.enable_cli 0
apc.enabled 1
apc.file_md5 0
apc.file_update_protection 2
apc.filters
apc.gc_ttl 3600
apc.include_once_override 0
apc.lazy_classes 0
apc.lazy_functions 0
apc.max_file_size 10M
apc.mmap_file_mask
apc.num_files_hint 1000
apc.preload_path
apc.report_autofilter 0
apc.rfc1867 0
apc.rfc1867_freq 0
apc.rfc1867_name APC_UPLOAD_PROGRESS
apc.rfc1867_prefix upload_
apc.rfc1867_ttl 3600
apc.serializer default
apc.shm_segments 1
apc.shm_size 500M
apc.shm_strings_buffer 4M
apc.slam_defense 1
apc.stat 1
apc.stat_ctime 0
apc.ttl 0
apc.use_request_time 1
apc.user_entries_hint 4096
apc.user_ttl 0
apc.write_lock 1
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello :)

What version of PHP is installed on your system?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
What method did you use to install APC?

Thank you.
 

goodmove

Well-Known Member
May 12, 2003
643
4
168
What method did you use to install APC?

Thank you.
Hi Michael

I downloaded the source code from PECL (http://pecl.php.net/get/APC-3.1.13.tgz) and then:
--
tar zxvf APC-3.1.13.tgz
cd APC-3.1.13
phpize
./configure --enable-apc --enable-apc-mmap --with-php-config=/usr/local/bin/php-config
make
make install

In php.ini
--
extension="apc.so"
apc.enabled=1
apc.shm_segments=1
apc.shm_size=64

The cache is working, however it only lasts for a few minutes and restarts itself. I can see the cache statistics from the apc control panel which comes with the source code.

I have these fcgid options in /etc/httpd/conf/php.conf
--
FcgidMaxRequestsPerProcess 1000
FcgidProcessLifeTime 7200
FcgidMaxProcesses 300
FcgidIOTimeout 120
FcgidIdleTimeout 600
FcgidBusyScanInterval 120
FcgidErrorScanInterval 5
FcgidZombieScanInterval 5
FcgidMinProcessesPerClass 0
FcgidMaxProcessesPerClass 6
FcgidMaxRequestLen 20468982

PHP 5.3.28
 
Last edited: