什么原因导致 Opcache 手动重启

什么原因导致 Opcache 手动重启

我已经使用 php-fpm 设置了 opcache,但出于某种原因,它一直在手动重启。我没有执行重启操作,并且将强制重启超时设置为 2700 秒(2 小时),因此缓存不会被清除。

什么原因导致手动重启?

Array
(
    [opcache_enabled] => 1
    [cache_full] => 
    [restart_pending] => 
    [restart_in_progress] => 
    [memory_usage] => Array(
            [used_memory] => 58506120
            [free_memory] => 478364792
            [wasted_memory] => 0
            [current_wasted_percentage] => 0
        )
    [interned_strings_usage] => Array(
            [buffer_size] => 16777216
            [used_memory] => 5840560
            [free_memory] => 10936656
            [number_of_strings] => 3946503
        )
    [opcache_statistics] => Array(
            [num_cached_scripts] => 1553
            [num_cached_keys] => 3015
            [max_cached_keys] => 16229
            [hits] => 52263
            [start_time] => 1475655854
            [last_restart_time] => 1475662737
            [oom_restarts] => 0
            [hash_restarts] => 0
            **[manual_restarts] => 97**
            [misses] => 1553
            [blacklist_misses] => 0
            [blacklist_miss_ratio] => 0
            [opcache_hit_rate] => 97.114241117883
        )
)

答案1

挖掘后进入源代码, 我发现“manual_restart”计数器每次调用时都会增加opcache_reset()

相关内容