Skip to content

help request: My APISIX is experiencing 100% CPU utilization and has become unresponsive #12275

Open
@zhaoqiang1980

Description

@zhaoqiang1980

Description

When the free_size of Prometheus in APISIX's share_dict becomes 0, will it trigger a 100% CPU exception? This issue occurred in 2 out of 38 instances. Even after removing the traffic, the CPU remains fully occupied. This is what was observed using perf tools and flamegraph.
ngx_shmtx_lock ngx_shmtx_unlock

Image
strace信息:
Image
perf top信息:

Image

We have mounted too many routes, so the metrics are very large. The currently allocated memory is 100M.
what should i do ? scale prometheus share dict?

Environment

apisix :2.15
Linux 4 3.1-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
openresty/1.21.4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionlabel for questions asked by users

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions