0

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.

Abhishek Dujari
  • 567
  • 2
  • 5
  • 17

2 Answers2

0

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.

Abhishek Dujari
  • 567
  • 2
  • 5
  • 17
0

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?

Alessio Periloso
  • 198
  • 2
  • 10
  • no i did not use chroot. the pool config is standard unedited version. APC does work but I just did not see the files. – Abhishek Dujari Jul 02 '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 02 '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. – Abhishek Dujari Jul 03 '12 at 05: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: http://serverfault.com/questions/403135/what-does-apc-mmap-file-mask-really-do) – Alessio Periloso Jul 03 '12 at 12:10