4

I am using nginx + php5-fpm with multiple sites & pools.

Every pool in the fpm is chrooted.

Normally everything works as expected. But sometimes (every 1/20th request), especially if I requested Site B before, site A serves the content of site B. I already looked into nginx config, it is always using the correct fpm socket (looked into error/access log). Also every fpm-pool has its own name and socket.

I found this post which describes my problem, but I don't have APC installed...: http://regilero.github.io/Drupal/English/2013/05/16/Warning_chrooted_php_fpm_and_apc/

So does someone have an idea what could be wrong?

Sapd
  • 141
  • 1
  • 3
    You should provide your nginx.conf and both site A and site B virtual configs. Also what is the version of nginx? What about php5-fpm log? – Wiggler Jtag Feb 16 '14 at 01:10
  • 1
    Post your php-fpm configuration as well please. – Fleshgrinder Feb 16 '14 at 18:29
  • Did you found a solution for that ? Also, are you by chance running this on a Digital Ocean droplet ? What OS are you running it on? Asking because it is happening to us as well, and it only happens on their VMs. I am using basically the same config on a lot of places and this is the only place I am observing that. I have a suspicion that they are maybe doing some sort of memory deduplication that is either too aggressive or buggy. – user221326 Feb 20 '15 at 17:29
  • 1
    Hey, yes I found it. It was xcache, or this other caching tool APC. The Problem: I used chroot with same paths. (Every webspace was in a www folder). After renaming every www folder to www2, www3 etc. the issue was fixed. Also it wasn't fixed by apt-get remove xcache or apc, because the mod somehow still was there, so if you want to delete xcache or apc, you need to remove it manually. I runned it on Ubuntu, no VM. Answer if I could help you. :) – Sapd Feb 25 '15 at 19:11

1 Answers1

3

I encountered the same issue on Debian 8, under PHP5-fpm and Apache. My solution was to uncomment or add this line in php.ini:

opcache.enable=0

That seemed to be all. Thank you for comments on the original question that helped me track this down.

trey-jones
  • 210
  • 3
  • 8