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


   > > 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.
   
   I find this key (prometheus-metrics) in config-default.yml, and I want 
overwrite this value to 100m, so I add these configuration in configmap which 
will be volumed as config,yml.
   
   
https://github.com/apache/apisix/blob/e127cc7a43416673f4b0c77db1ecf09a191abcb8/conf/config-default.yaml#L212-L216
   
   So if I want to overwrite this key (prometheus-metircs) to 100m, where 
should I modify?
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to