Apcu slows down server (Apache2+PHP)

338 views Asked by At

We did a software change which increased Apcu usage on a production server running perfectly for months.

After about 20 hours of running with response time of 15msec at ~400 hits/sec the server response time increases to ~500msec. (This repeats itself after ~20 hours if we restart apache or reset apcu)

Resetting apcu with apc_clear_cache ("user"); brings the response time back to normal so the problem is APCu overload of some kind.

How can this be fixed? There is nothing in the logs explainng what the bottleneck is

Details:


At the time the issue happens the data on apcu usage is:
APCu memory consumption: 256,851,984 bytes
APCu items number: 519,311

Server:
PHP Version 7.3.18-1+ubuntu18.04.1+deb.sury.org+1
Apache/2.4.29 (Ubuntu)
APCu Support    Enabled
Version 5.1.17
APCu Debugging  Disabled
MMAP Support    Enabled
MMAP File Mask  no value
Serialization Support   php
Build Date  Aug 27 2019 08:46:38
Directive   Local Value Master Value
apc.coredump_unmap  Off Off
apc.enable_cli  Off Off
apc.enabled On  On
apc.entries_hint    4096    4096
apc.gc_ttl  3600    3600
apc.mmap_file_mask  no value    no value
apc.preload_path    no value    no value
apc.serializer  php php
apc.shm_segments    1   1
apc.shm_size    1024M   1024M
apc.slam_defense    Off Off
apc.smart   0   0
apc.ttl 0   0
apc.use_request_time    On  On

0

There are 0 answers