Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Mar 13, 2012 4:31 pm 
Offline
Senior Newbie

Joined: Wed Feb 15, 2012 10:41 pm
Posts: 14
I am running nginx 1.0.12, PHP 5.3.10 via PHP-FPM.

I compiled nginx and php5.3.10 myself. Here's my PHP compile config:
Code:
'./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:
Code:
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:
Code:
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:
Code:
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


Top
   
 Post subject:
PostPosted: Tue Mar 13, 2012 7:33 pm 
Offline
Senior Member

Joined: Sun Feb 21, 2010 5:12 pm
Posts: 64
Maybe replace
Code:
apc.shm_size=64 

with
Code:
apc.shm_size=64M

I don't recall which version made that change last year.


Top
   
 Post subject:
PostPosted: Tue Mar 13, 2012 9:34 pm 
Offline
Senior Newbie

Joined: Wed Feb 15, 2012 10:41 pm
Posts: 14
Unfortunately that didn't work. When I use 64M APC defaults to 30M in my version, so for my version it works without the M.


Top
   
 Post subject:
PostPosted: Wed Mar 14, 2012 2:00 am 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Are you running every PHP script with the same FPM pool, or have you set up different pools for different websites? Does apc.php share the same pool as the rest of your website(s)? Depending on how you set everything up, your apc.php might be sitting in its own cache.


Top
   
 Post subject:
PostPosted: Wed Mar 14, 2012 8:40 am 
Offline
Senior Newbie

Joined: Wed Feb 15, 2012 10:41 pm
Posts: 14
Just one pool that contains them all. Here's my php-fpm.conf settings:

Code:
[www]
user = nginx
group = nginx
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 1


Top
   
 Post subject:
PostPosted: Wed Mar 14, 2012 12:33 pm 
Offline
Senior Member

Joined: Sun Feb 21, 2010 5:12 pm
Posts: 64
I suppose I'd try to run with just
Code:
extension=apc.so

in the php.ini so that it runs with the defaults.

I assume you've made sure to kill php5-fpm completely and restarted.

What distro, btw? Any special reason for compiling from source?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group