-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High TIME_WAIT Connections and Growing Cached Memory in NGINX with OpenResty #1555
Comments
I'm with the same issue. The Cached Memory just increase and I have uncountable TIME_WAIT status in my netstat -an I'm trying to fix one case per time to focuses on each problem. About the TIME_WAIT, my sysctl.conf also has the configuration below. Note that I'm running Nginx on Docker Environment and it was applied in host config and in docker run parameters.
For the Cache issue, even when i enable some configs in nginx.conf like openfile_, proxy_buffers and vod_metadata / vod_performance, the usage increase a lot. I don't know what else is possible here... |
TIME_WAIT is no longer an issue in modern linux distro as they will be freed and reuse if ephemeral port number are exhausted. However if you still start to see performance issue with nginx you should configure properly proxy pass to reuse open connections with keep_alive : https://www.f5.com/company/blog/nginx/avoiding-top-10-nginx-configuration-mistakes#no-keepalives You should not need any sysctl configuration to fix this. keepalive requieres to define an |
Regarding the cache memory, looking at your configuration, I see you are using "remote" mode against S3 storage, so it doesn't make much sense - nginx doesn't read from the file system, it reads from a remote server, so how can it affect the OS cache? |
I'm experiencing an issue with my NGINX configuration where:
TIME_WAIT
state.I’ve already tried multiple optimizations without success.
What I’ve Tried
NGINX Configuration
keep-alive
settings:Linux Kernel Parameters
tcp_tw_reuse
:tcp_fin_timeout
:Clearing Cached Memory
Guidance Needed
TIME_WAIT
connections.Any advice or suggestions would be greatly appreciated.
Here's my nginx.conf:
The text was updated successfully, but these errors were encountered: