mdounin at mdounin.ru
Tue May 24 17:15:05 UTC 2022
On Tue, May 24, 2022 at 08:04:16AM -0700, Dk Jack wrote:
> I am noticing this with our modules. Although, we do not do not message
> with any nginx reference counting etc.
> At most, we are sending 403-forbidden for some requests. Could you suggest
> some ways about debugging this?
Request reference counting automatically happens in various nginx
functions, such as ngx_http_read_client_request_body() and
ngx_http_finalize_request(). Incorrect reference counting
suggests that your module does something wrong: for example, calls
ngx_http_finalize_request() when it shouldn't. Or returns an
incorrect result from a handler, which causes
ngx_http_finalize_request() to be called when it shouldn't.
The most straightforward way to debug such problems is to enable
debug logging and check all reference counting step-by-step for a
request which results in the alert.
More information about the nginx-devel