APC is on, but is Apache still opening files?

I am working on a high-traffic web server farm serving dynamic PHP code that includes about 100 files for most requests. The APC optional code cache is turned on, the include_once_override parameter is enabled, and I allocated 64 MB of the bar to the cache, but when I finish the Apache process, I still see its open () ing and stat (), all of which include for each request, which should be pulled out of the cache. I see in cache statistics that the cache is populated and used with a 100% number. Can anyone suggest any kind of understanding?

+5
source share
1 answer

Be sure that you use the full paths for each application in your application. According to APC documentation:

apc.stat integer

Use caution when changing this setting. This value is enabled by default, causing APC to stat (check) the script for each request to determine if it has changed. If it was changed, it will recompile and cache the new version. If this option is turned off, APC will not check, which usually means that to force the APC check, you need to restart the web server or clear the cache manually. Please note that FastCGI web server configurations may not clear the cache upon reboot. On a production server, where script files rarely change, significant performance gains can be achieved with disabled statistics.

/ , , ( , / Unix) APC , . , APC stat .

PHP , :

// Assumes __FILE__ is in the root of your project
define('PATH_PROJECT', realpath(dirname(__FILE__)));

, :

include_once PATH_PROJECT . '/some/dir/file.php';

, , .

+7

All Articles