-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: lua_shared_dict prometheus-metrics overflow #11948
Comments
You can use |
Prometheus plugin works on all pods and it returns 69000+ rows from each pod. |
K8S部署的apisix怎么修改lua_shared_dict的大小,试了很多地方都是修改不成功 |
In ConfigMap - config.yaml nginx_config:
http:
lua_shared_dict:
prometheus-metrics: 40m |
Generally this has to do with how discrete the requests are on your API service, which is related to multiple metrics such as route_id, resp_code, or even consumer_id, etc. (https://apisix.apache.org/docs/apisix/next/plugins/prometheus/#labels) Multiply them together and that's the number of record entries you'll get, which in the prometheus or observability is called a high cardinality. |
Will it be okay if we increase the lua_shared_dict - prometheus-metrics parameter value to 512m or 1024m? |
Current Behavior
We deploy apisix in K8s cluster and have problem with prometheus metrics.
We noticed that lua_shared_dict prometheus-metrics overflows, then the number of apisix_nginx_metric_errors_total errors starts to grow and all metrics stop displaying correctly.
We try increase the prometheus-metrics parameter to 40m in the ConfigMap (config.yaml), but after 2 months this lua_shared_dict was full on all pods and errors started to occur again.
Current Apisix state
Expected Behavior
No response
Error Logs
No response
Steps to Reproduce
Environment
apisix version
): 3.10.0uname -a
): Linux apisix-69cfdc5fbf-m7k27 5.14.0-362.13.1.el9_3.x86_64 SMP PREEMPT_DYNAMIC Fri Nov 24 01:57:57 EST 2023 x86_64 GNU/Linuxopenresty -V
ornginx -V
): openresty/1.25.3.2curl http://127.0.0.1:9090/v1/server_info
): 3.5.0luarocks --version
):The text was updated successfully, but these errors were encountered: