How to share APC cache between several PHP processes when running under FastCGI?

后端 未结 3 1730
情话喂你
情话喂你 2020-12-13 01:05

I\'m currently running several copies of PHP/FastCGI, with APC enabled (under Apache+mod_fastcgi, if that matters). Can I share cache between the processes? How can I chec

3条回答
  •  误落风尘
    2020-12-13 01:39

    The cache should be shared between processes. You should be seeing the same value for the mmap file between phpinfo() and apc.php invocations. It is working for me with the suggested default APC configuration settings:

    extension="apc.so"
    apc.enabled=1
    apc.shm_segments=1
    apc.shm_size=128
    apc.ttl=7200
    apc.user_ttl=7200
    apc.num_files_hint=1024
    apc.mmap_file_mask="/tmp/apc.XXXXXX"
    apc.enable_cli=1
    

    You may want to post your settings. I've seen warnings that the mmap_file_mask must be exactly one of the values they allow. So if you are missing one of those Xs there is no telling what you will get.

    Maybe it involves your fastcgi+apache configuration.

提交回复
热议问题