我遇到了我的APCconfiguration问题。 看起来像APC在不同的目录中caching具有相同名称的文件,就好像它们是相同的文件一样。
目录结构如下:
src/ development/ edge/ stable/ tag-20101101/ tag-20101115/ ...
代码驻留在开发,边缘和每个标签目录中。 看起来会发生的是,当APCcaching例如src / stable / foo / bar / quux.php时,它使用src / development / foo / bar / quux.php相同的caching,即使它们不是相同的文件。 有些文件可能包含使用相对path,虽然我还没有确定是否有相对包含的文件之间的任何连接和APCcaching问题。
我的APCconfiguration(由apc.php报告)如下:
apc.cache_by_default 1 apc.canonicalize 1 apc.coredump_unmap 0 apc.enable_cli 0 apc.enabled 1 apc.file_md5 0 apc.file_update_protection 2 apc.filters apc.gc_ttl 3600 apc.include_once_override 0 apc.lazy_classes 0 apc.lazy_functions 0 apc.max_file_size 5M apc.mmap_file_mask /tmp/apc.tKRzKb apc.num_files_hint 1000 apc.preload_path apc.report_autofilter 0 apc.rfc1867 0 apc.rfc1867_freq 0 apc.rfc1867_name APC_UPLOAD_PROGRESS apc.rfc1867_prefix upload_ apc.rfc1867_ttl 3600 apc.shm_segments 1 apc.shm_size 128 apc.stat 1 apc.stat_ctime 0 apc.ttl 0 apc.use_request_time 1 apc.user_entries_hint 4096 apc.user_ttl 0 apc.write_lock 1
我正在使用PHP 5.3.2和APC 3.1.3p1,使用PHP-FPM。 该服务器是一个具有4GB分配RAM的虚拟化RHEL 5.4,运行在另一台具有32 GB RAM和12个AMD Opteron 2.4 GHz CPU内核的RHEL 5.4服务器上。
有没有人有任何想法可能会导致这一点,或者我可能做什么来解决它?
根据文档path可以在没有统计模式下进行规范化。
http://php.net/manual/en/apc.configuration.php
我解释,因为它可能工作,如果你在上面的configuration中更改apc.stat为0。
//约翰
原来问题不是由于APC,而是因为托pipe代码的NFS3 NAS被挂载为NFS4。 这造成了文件系统caching的问题。 在一定程度上使用APC掩盖了实际问题。
感谢您的时间,但。