1

我们进行了软件更改,增加了 Apcu 在生产服务器上的使用率,该服务器可以完美运行数月。

在以约 400 次点击/秒的速度运行约 20 小时后,响应时间为 15 毫秒,服务器响应时间增加到约 500 毫秒。(如果我们重新启动 apache 或重置 apcu,这会在大约 20 小时后重复)

使用 apc_clear_cache ("user") 重置 apcu;使响应时间恢复正常,因此问题是某种 APCu 过载。

如何解决这个问题?日志中没有任何内容可以解释瓶颈是什么

细节:


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

4

0 回答 0