APC 缓存可以在以 fastcgi/fcgid 运行的多个 PHP 进程之间共享吗?
我正在运行一个 LAMP 盒子,其中 PHP 作为 fcgid 运行。 APC 已安装且运行良好。然而,每个 PHP 进程都有自己的缓存。这是一个问题,因为拥有 10 个具有 300MB 共享 APC 缓存的 PHP 进程比拥有 10 个 PHP 进程(每个进程具有冗余的 30MB 非共享 APC 缓存)更有意义。
8 个月前有一个关于此主题的先前线程 (在 FastCGI 下运行时如何在多个 PHP 进程之间共享 APC 缓存?),我想知道从那时起这个领域是否有任何进展。
I'm running a LAMP box with PHP running as fcgid. APC is installed and working well. However, each PHP process gets its own cache. This is a problem, because it would make far more sense to have 10 PHP processes with 300MB shared APC cache than 10 PHP processes, each with a redundant 30MB unshared APC cache.
There was a prior thread on this topic 8 months ago (How to share APC cache between several PHP processes when running under FastCGI?) and I am wondering if there have been any developments in this realm since then.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
据我所知,仍然不可能在多个进程中使用任何 PHP 缓存器的共享内存缓存...无论如何,除非您负载非常重,否则我想,您应该可以使用单独的缓存,因为它们会很快就满了。嘿,现在 RAM 很便宜!
As far as I know it's still not possible to use shared memory cache with any PHP cacher amongst multiple processes... anyway, unless you're under extremely heavy load you should be fine with separate caches, I suppose, since they'll be filled pretty quickly. And hey, RAM is cheap nowadays!
就在几分钟前,我在 PHP https://bugs.php 的错误跟踪中读到了它.net/bug.php?id=57825 它已修复,但您必须使用spawnfcgi 或 php-fpm http:// /php-fpm.org/
引自 Ramus
I was reading about it just minutes ago in the bug tracking of PHP https://bugs.php.net/bug.php?id=57825 it's fixed but you must use spawnfcgi or php-fpm http://php-fpm.org/
Quoted from Ramus
事实证明,如果您确实使用不同的进程,这仍然是不可能的: http ://pecl.php.net/bugs/bug.php?id=11988(由 APC 相关部分的作者于 2009 年 11 月 13 日更新)。
It turns out that this is still not possible if you are truly using different processes: http://pecl.php.net/bugs/bug.php?id=11988 (updated 11/13/2009 by the author of the relevant portion of APC).