Can I use the APC cache for several PHP processes running as fastcgi / fcgid?

I am running a LAMP field with PHP working as fcgid. APC is installed and working well. However, each PHP process gets its own cache. This is a problem because it would be much wiser to have 10 PHP processes with a common APC cache of 300 MB than 10 PHP processes, each of which has a redundant 30 megabyte APC cache code without access.

Was there a previous thread on this subject 8 months ago ( How to split the APC cache between several PHP processes when working under FastCGI? ), And I’m wondering, there have been some events in this area since then.

+3
source share
3 answers

As far as I know, it is still not possible to use shared memory cache with any PHP cache among several processes ... anyway, if you are not in an extremely heavy load, you must be very good at separate caches, I suppose since they will fill up pretty quickly. And hey, RAM is cheap now!

+1
source

I read about this just a few minutes ago in tracking PHP errors https://bugs.php.net/bug.php?id=57825 fixed, but you should use spawnfcgi or php-fpm http://php-fpm.org/

Quote from Ramus

, spawnfcgi php-fpm. .

+1

It turns out that this is still not possible if you really use different processes: http://pecl.php.net/bugs/bug.php?id=11988 (updated 11/13/2009) author of the corresponding part of APC).

0
source

Source: https://habr.com/ru/post/1723501/


All Articles