Skip to content

The memory of version 3.5.6 keeps growing. #3214

@woodada

Description

@woodada

版本:
-----------Pika server----------
pika_version: 3.5.6
pika_git_sha:510ae73081190fbd85ec37b40c067b2b1aa9e615
pika_build_compile_date: 2025-09-08 11:08:21
redis_version: 3.5.6

配置:
port : 9221
thread-num : 4
thread-pool-size : 16
sync-thread-num : 6
log-path : ./log/
db-path : ./db/
write-buffer-size : 256M
arena-block-size :
timeout : 60
requirepass :
masterauth :
userpass :
userblacklist :
instance-mode : classic
databases : 1
replication-num : 0
consensus-level : 0
dump-prefix :
dump-path : ./dump/
dump-expire : 0
pidfile : ./pika.pid
maxclients : 20000
target-file-size-base : 20M
expire-logs-days : 7
expire-logs-nums : 10
root-connection-num : 2
slowlog-write-errorlog : no
slowlog-log-slower-than : 10000
slowlog-max-len : 128
db-sync-path : ./dbsync/
db-sync-speed : -1
slave-priority : 100
sync-window-size : 9000
max-conn-rbuf-size : 268435456
write-binlog : yes
binlog-file-size : 104857600
max-cache-statistic-keys : 0
small-compaction-threshold : 5000
max-write-buffer-size : 10737418240
max-write-buffer-num : 2
max-client-response-size : 1073741824
compression : snappy
max-background-flushes : 1
max-background-compactions : 2
max-background-jobs : 3
max-cache-files : 5000
max-bytes-for-level-multiplier : 10
slotmigrate : no
block-cache: 10G
share-block-cache: yes
default-slot-num : 1024
cache-index-and-filter-blocks: yes
pin_l0_filter_and_index_blocks_in_cache : yes
throttle-bytes-per-second : 207200000
max-rsync-parallel-num : 4
cache-num : 16
cache-model : 1
cache-type: string, set, zset, list, hash
zset-cache-field-num-per-key : 512
zset-cache-start-direction : 0
cache-maxmemory : 17179869184
cache-maxmemory-policy : 1
cache-maxmemory-samples: 5
cache-lfu-decay-time: 1

现象:
如下图,内存一直上涨,凌晨3点~6点几乎没有请求,内存也没有降低。
Image

日志:日志里无任何异常

ls -lh *

-rw-r--r-- 1 root root 20M Jan 7 10:12 pika.b05217f30614.root.log.INFO.20260104-025832.1
-rw-r--r-- 1 root root 241 Jan 4 10:58 pika.b05217f30614.root.log.WARNING.20260104-025832.1
lrwxrwxrwx 1 root root 49 Jan 4 10:58 pika.INFO -> pika.b05217f30614.root.log.INFO.20260104-025832.1
lrwxrwxrwx 1 root root 52 Jan 4 10:58 pika.WARNING -> pika.b05217f30614.root.log.WARNING.20260104-025832.1

cat pika.WARNING

Log file created at: 2026/01/04 02:58:32
Running on machine: b05217f30614
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
W20260104 02:58:32.631595 1 pika_server.cc:71] 0.0.0.0

连接数也不多

netstat -anp| grep 9221|wc -l
18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions