ingress-nginx icon indicating copy to clipboard operation
ingress-nginx copied to clipboard

Add metrics to count requests buffered to temporary file

Open frittentheke opened this issue 8 months ago • 4 comments

Currently NGINX logs a warning for requests that are bigger than the configured client in-memory buffer (https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#client-body-buffer-size):

[warn] 128#128: *5837 a client request body is buffered to a temporary file /tmp/nginx/client-body/0000000097, client: 10.xx.xx.xx, server: xxxx, request: "POST /api/v1/endpoint HTTP/2.0", host: "xxx", referrer: "h [...]

While logging this per request is already really helpful to find potential optimizations, having these events counted as a Prometheus metric would be even more helpful, as this is usually used by users and allows for correlation (e.g. buffered vs. non-buffered requests, ...).

frittentheke avatar Feb 24 '25 15:02 frittentheke