php-fpm 下的 apc 不缓存文件
我目前已安装 apc 并在 php-fpm 下运行。 apc 信息页面反映了用户缓存条目,但文件缓存反映了 0 个已缓存的文件。其他类似的线程指出,如果在 FCGI 下运行,apc 将不会在工作进程之间共享缓存,并建议使用 php-fpm。我与这些人分享了这些症状,但是我已经在使用 php-fpm 并且它运行良好。如果有人在这里有任何想法,将不胜感激。已经在工作中坚持了几个小时了。我在另一个盒子上设置了它正在工作的地方,我相信我遵循了相同的程序,并且两个盒子是相同的。不知道我哪里可能出错了。我很乐意提供更多信息。谢谢。
更新:当使用调试编译 APC 时,每个文件都会出现文件太大错误。工作箱上的情况并非如此。查看源代码,我找到了相关的片段 -
if(APCG(max_file_size) < fileinfo->st_buf.sb.st_size) {
apc_debug("File is too big %s (%d - %ld) - bailing\n" TSRMLS_CC, filename,t,fileinfo->st_buf.sb.st_size);
goto cleanup;
}
它在 fileinfo strut 中具有正确的文件大小,所以我想象 max_file_size 被搞乱了。我将尝试追踪此事。有人有什么想法吗?这在 EC2 之外的 64 位 Ubuntu 上运行良好,具有相同的配置和文件。
来自源代码的所有构建测试都失败,并且对该值进行硬编码没有帮助,它仍然不缓存。
I currently have apc installed and running under php-fpm. The apc info page reflects user cache entries but the file cache reflects 0 files cached. Other similar threads state that if runnning under FCGI, apc will not share the cache between the worker processes, and recommend using php-fpm. I share the symtoms with these people, however I am already using php-fpm and it is running fine. If anyone has any idea here, would be greatly appriciated. Been stuck on it at work for a couple hours now. I have another box set up where it is working and I believe I followed the same procedure, and both boxes are identical. Not sure where I could have gone wrong. I would be happy to provide more information. Thanks.
Update : When compiling APC with debug, I get file too big errors with every file. This is not the case on the working box. Looking through the source, I found the relevant snippet -
if(APCG(max_file_size) < fileinfo->st_buf.sb.st_size) {
apc_debug("File is too big %s (%d - %ld) - bailing\n" TSRMLS_CC, filename,t,fileinfo->st_buf.sb.st_size);
goto cleanup;
}
It has the correct filesize in the fileinfo strut, so I'm imagining that max_file_size is messed up. I'm going to try and track this down. Anyone have any idea? This is working fine on 64 bit Ubuntu outside of EC2, with identical configuration and files.
All the build tests from source are failing and hardcoding that value in doesn't help, it still doesn't cache.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论