Welcome! Log In Create A New Profile

Advanced

connections in CLOSE_WAIT

July 23, 2019 09:18PM
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@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@ip-10-50-18-73 nginx]$ netstat -n | grep CLOSE_WAIT | wc -l
35
[centos@ip-10-50-18-73 nginx]$ [centos@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@ip-10-50-18-73 nginx]$
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

connections in CLOSE_WAIT

dnj0496 1280 July 23, 2019 09:18PM

Re: connections in CLOSE_WAIT

dnj0496 656 July 24, 2019 07:16PM

Re: connections in CLOSE_WAIT

dnj0496 705 July 24, 2019 10:52PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 231
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready