I am maintaining a large wordpress site and I am attempting to troubleshoot an unrelated problem by adding trace statements in the code which are nothing more than calls to error_log(). In brief my server setup is a file server which shares out the website's document root via nfs. There are 2 web servers which are running nginx+apc+php/fpm. I am editing the php files directly on the file server and when I view the files from the web servers i can see my changes however when I tail the error log i can observe that my changes are not immediately reflected. I continue to see old trace statements as if I hadn't made the change at all.
My running theory is that the code is getting cached either in apc (duh) or in a client-side nfs cache (unlikely since i can see the edits with vi). I try to mitigate this by flushing the apc cache using a script which runs apc_clear_cache(). Additionally I have restarted nginx as well as php-fpm hoping that something will flush the old cached php code. None of these methods have worked and I must resort to waiting up to an hour or more before i see my code changes reflected in the logs.
The website I am troubleshooting is fairly high traffic so remounting the nfs share is not really an option for me. My assumption is that the apc opcode cache is not actually clearing but I have been watching the stats with apc.php and I do see what looks like the cache being rebuilt after i run my flush script. I've been at this for a couple days and troubleshooting a simple problem has turned into a huge headache. Can anyone provide any ideas of other things to look at or try to make my code changes more immediate?
I never found a satisfactory cause for this issue but we opted to remove NFS from the equation and our problem has gone away.Thanks for the assistance everyone.