connections in CLOSE_WAIT
Dk Jack
dnj0496 at gmail.com
Wed Jul 24 01:17:36 UTC 2019
Hi,
In my module, I am capturing the request body to check if the body contains
some specific content. If the body does not contain the specific content
then I pass on the request without modification. Otherwise, I send a
HTTP_FORBIDDEN. I am using 'ngx_http_read_client_request_body' call to
capture the body. Everything seems to be working fine. My requests are
forwarded to the orgin server and my client is receiving the response from
the origin server correctly.
However, what I notice is that the nginx is not releasing the client side
(see below). Nginx status module reports same number of active connections
in 'writing' state. Is there something special I need to do in my module to
ensure the connections are closed properly when I am capturing body? Any
help is greatly appreciated. Thanks.
Regards,
Dk.
[centos at ip-10-50-18-73 nginx]$ netstat -n | grep CLOSE_WAIT | head -4
tcp 1 0 10.50.18.73:443 10.50.30.239:60116
CLOSE_WAIT
tcp 1 0 10.50.18.73:443 10.50.30.239:60092
CLOSE_WAIT
tcp 1 0 10.50.18.73:443 10.50.30.239:60112
CLOSE_WAIT
tcp 1 0 10.50.18.73:443 10.50.30.239:60054
CLOSE_WAIT
[centos at ip-10-50-18-73 nginx]$ netstat -n | grep CLOSE_WAIT | wc -l
35
[centos at ip-10-50-18-73 nginx]$ [centos at ip-10-50-18-73 nginx]$ curl -k
https://localhost/nginx_status
Active connections: 37
server accepts handled requests
41 41 472
Reading: 0 Writing: 36 Waiting: 1
[centos at ip-10-50-18-73 nginx]$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20190723/276156b7/attachment-0001.html>
More information about the nginx-devel
mailing list