Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have been using xcache for a long time. Recently I put together php-fpm and nginx. I see apc is installed and enabled in the configuration. I was assuming that apc will automatically opcode the files and store it somewhere. According to config it should be in /tmp/apx.xxxx but there is no such thing there.

What am i missing? any clues to investigate would be of much help. Please note I am using php 5.3 fpm.

thanks mates.

UPDATE: i looked at apc.php it says things are fine. will just have to take its word for it.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

the cache files did show up eventually. Cant remember the exact location. The APC admin page shows that caching is working as you can see from the graphs.

In the combination of nginx and php-fpm I have noticed that for changes to take effect (like installing a new module) you need to retstart both nginx and php-fpm. This could be something only with my versions of the install.

hope it helps.

share|improve this answer

I've found the exact same behaviour, and I'm still wondering where the files are.
Did you use chroot with php-fpm? If so, if you set into the pool's config file /tmp, where did the file go? Into the chrooted /tmp directory, or outside the chroot?

share|improve this answer
    
no i did not use chroot. the pool config is standard unedited version. APC does work but I just did not see the files. –  Vangel Jul 2 '12 at 16:17
    
It is weird however. I was hoping that setting different paths for different pools would allow me to secure each user in his own memory region... but it seems it doesn't works that way. I think I'll try to hack it ;) –  Alessio Periloso Jul 2 '12 at 20:00
    
i believe you will have to run each pool as different user, if that's possible. else it should theoretically work with different pool configs. It could be a bug. I am using php 5.3.8 with fpm. –  Vangel Jul 3 '12 at 5:31
    
I am already running each pool with his own user, and it is not a bug since the APC module is loaded at php-fpm startup: then, when the process forks, it is using the same shared memory for all the processes. Now, even if I do understand this behaviour, I don't understand why using different files doesn't mean using different memory locations :S In my case, I am using php 5.3.14-1, and the "bug" is still present... so I think somebody else should explain us what does apc.mmap_file_mask really do (as in my question: serverfault.com/questions/403135/…) –  Alessio Periloso Jul 3 '12 at 12:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.