2

I've setup opcache with php-fpm but for some reason, it keeps manually restarting. I've not actioned a restart and I've set the force restart timeout to 2700 seconds (2 hours) so the cache shouldn't get cleared.

What causes a manual restart?

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
        )
)
James
  • 173
  • 4

1 Answers1

4

After digging into the source code, I found the "manual_restart" counter is increased every time you call opcache_reset().

coudenysj
  • 141
  • 2