You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/16 14:21:51 UTC

[GitHub] [apisix] tzssangglass commented on issue #3917: request help: question about Prometheus memory consumption

tzssangglass commented on issue #3917:
URL: https://github.com/apache/apisix/issues/3917#issuecomment-920947657


   > When I set prometheus-metrics as 100m in configmap apisix, apisix throw an error about key conflicted.
   > 
   > Apisix version is 2.7
   > 
   > ```
   >      http:
   >         lua_shared_dicts:              # add custom shared cache to nginx.conf
   >           prometheus-metrics: 100m 
   > ```
   > 
   > ```shell
   > /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init
   > WARNING: using fixed Admin API token has security risk.
   > Please modify "admin_key" in conf/config.yaml .
   > /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init_etcd
   > 2021/09/16 08:28:56 [emerg] 1#1: the size 104857600 of shared memory zone "prometheus-metrics" conflicts with already declared size 10485760 in /usr/local/apisix/conf/nginx.conf:64
   > nginx: [emerg] the size 104857600 of shared memory zone "prometheus-metrics" conflicts with already declared size 10485760 in /usr/local/apisix/conf/nginx.conf:64
   > ```
   
   This has nothing to do with 100m, the error logs have clearly indicated this to you.
   
   the shared dict `prometheus-metrics` has been already defined, see: https://github.com/apache/apisix/blob/d6c09fba6543c9fc28520ef7172596a01417222f/apisix/cli/ngx_tpl.lua#L171
   
   so you can not define shared dict with the same name(`prometheus-metrics`) in a custom configuration.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org