APC not caching under nginx and PHP-FPM
I compiled nginx and php5.3.10 myself. Here's my PHP compile config:
'./configure' '--enable-fpm' '--with-fpm-user=nginx' '--with-fpm-group=nginx' '--with-pcre-regex' '--without-sqlite3' '--with-zlib' '--with-bz2=/bin/bzip2' '--with-openssl' '--enable-mbstring' '--with-mysql=/usr' '--with-mysql-sock' '--disable-pdo' '--enable-sockets' '--without-sqlite' '--enable-zip' '--without-pear' '--with-curl' '--with-mcrypt'
PHP info says that APC is enabled:
Version 3.1.3p1 MMAP Support Enabled MMAP File Mask /dev/zero Locking type pthread mutex Locks Revision $Revision: 286798 $ Build Date Apr 18 2010 06:44:34
But, loading up apc.php shows no user or system files are being cached:
Cached Files 0 ( 0.0 Bytes) Free: 64.0 MBytes (99.9%) Hits: 1 (100.0%) Used: 40.0 KBytes (0.1%) Misses: 0 (0.0%)
I have tried for hours to find an answer as to why APC is not caching any files. I thought maybe it was permissions on the /tmp folder, so I tried using a new folder (/tmp-apc with 0777 permissions) to no avail. I tried using /dev/zero and it still doesn't work.
Anyone have any idea why APC is not caching any files?
Here is my php.ini APC config:
extension=apc.so apc.enabled=1 apc.shm_segments=1 apc.shm_size=64 apc.ttl=0 apc.user_ttl=0 apc.num_files_hint=0 apc.enable_cli=0 ;apc.mmap_file_mask=/tmp-apc/apc.shm.XXXXXX apc.mmap_file_mask=/dev/zero apc.optimization = 0 apc.cache_by_default = 1 apc.use_request_time = 1 apc.include_once_override=1
I don't recall which version made that change last year.
[www] user = nginx group = nginx pm = dynamic pm.max_children = 10 pm.start_servers = 2 pm.min_spare_servers = 1