Baoyuantop commented on issue #13437:
URL: https://github.com/apache/apisix/issues/13437#issuecomment-4623064685

   The error is caused by the `prometheus-cache` shared dict, not by 
`prometheus-metrics`.
   
   In APISIX 3.16, `prometheus-cache` is rendered from:
   
   ```yaml
   nginx_config:
     meta:
       lua_shared_dict:
         prometheus-cache: 100m
   ```
   
   Putting `prometheus-cache` under `nginx_config.http.lua_shared_dict` will 
not resize the actual cache dict. Your log shows the generated metrics text is 
10517187 bytes, which is slightly larger than the default 10m cache, so the 
timer cannot save cached metrics and the metrics endpoint later returns `data 
is nil`.
   
   Please move `prometheus-cache` to `nginx_config.meta.lua_shared_dict`, 
restart APISIX, and verify that the generated nginx.conf contains 
`lua_shared_dict prometheus-cache 100m;`.


-- 
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