I am having some problem with APC working properly. File cache always shows Hits = 1 and misses keep increasing, but at the same time, the cached file entries show some numbers in hundreds over some time. User cache entries shows to be working normally it seems. But almost twice a day i keep getting Internal server error and then have to restart php-fpm. I hv allocated 1024M memory and some other regular config stuff. If you have more idea, can i have your email ID to discuss this and send you more details about it.
The APC config is as following. I have tried Non-zero ttls and other options. Also, in the FastCGI config - I have tried settingPHP_FCGI_CHILDREN as '0' and other values. I have set PHP_FCGI_MAX_REQUESTS (12000) more than FcgidMaxRequestsPerProcess value (8000), as i found in this article, http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
But still internal server error keeps coming almost twice a day and I have to restart PHP-FPM
APC config as below:
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 1
apc.lazy_classes 00
apc.lazy_functions 0
apc.max_file_size 4M
apc.mmap_file_mask /tmp/apc.mXJeFR
apc.num_files_hint 10000
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 1024M
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
PHP.FastCGI config is as following:
#!/bin/bash
PHPRC="/etc/php.ini"
PHP_FCGI_CHILDREN=16
PHP_FCGI_MAX_REQUESTS=12000
export PHPRC
export PHP_FCGI_CHILDREN
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php-cgi