TCP/Status CLOSE_WAIT for nginx, very long time

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

TCP/Status CLOSE_WAIT for nginx, very long time

vergil
Hello,

I run netstat, find one of nginx processes, its status always is CLOSE_WAIT,
never change for very long time, how to fix this? thanks.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,287966,287966#msg-287966

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: TCP/Status CLOSE_WAIT for nginx, very long time

Maxim Dounin
Hello!

On Wed, May 06, 2020 at 08:59:29PM -0400, q1548 wrote:

> I run netstat, find one of nginx processes, its status always is CLOSE_WAIT,
> never change for very long time, how to fix this? thanks.

Sockets in the CLOSE_WAIT states for a long time usually indicate
a socket leak.  First of all, make sure you are using latest nginx
version - that is, either 1.17.10 or 1.18.0.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: TCP/Status CLOSE_WAIT for nginx, very long time

vergil
Thank you, Maxim. If I use the latest nginx version with custom http module,
for a socket leak, what I need check in module code? thanks.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,287966,287989#msg-287989

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: TCP/Status CLOSE_WAIT for nginx, very long time

Maxim Dounin
Hello!

On Mon, May 11, 2020 at 01:17:28AM -0400, q1548 wrote:

> Thank you, Maxim. If I use the latest nginx version with custom http module,
> for a socket leak, what I need check in module code? thanks.

If you are using a 3rd party module, more or less any bug in the
module can result in a socket leak.  Most obvious thing to check
is if you are seeing socket leaks without the module - if not,
likely the problem is in the module.  Unfortunately, it is hard to
say anything beyond this.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: TCP/Status CLOSE_WAIT for nginx, very long time

vergil
Hello, Maxim, thank you.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,287966,288002#msg-288002

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx