Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussquestionlabel for questions asked by users

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions