-
Notifications
You must be signed in to change notification settings - Fork 273
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
balancer_by_lua_block : Reusing stale connection #65
Comments
@rohitjoshi What's in your nginx error logs (assuming you are not setting the error log filter level too high)? Usually such RSTs should be harmless since nginx will automatically retry a new connection for the current request. |
@rohitjoshi The nginx core does check broken connections in the connection pool, but race conditions are inevitable in case the nginx just tries to use an in-pool connection before it can handle a read event for the connection termination request from the remote. |
The issue is due to AWS NAT gateway terminates connection after 5 minutes. I am seeing below error in the error log. |
@rohitjoshi Yes, you need to enable the next upstream mechanism. |
Closing this and considering it answered. Latest Nginx versions also have |
Hello,
I am using balancer_by_lua for upstream routing which works great. We are seeing intermittent errors where nginx is caching the connection while upstream has already terminated.
See the below image. xxx.xxx.xxx.159 is OpenResty server and xxx.xxx.xxx.27 is upstream server.
Thanks,
Rohit Joshi
The text was updated successfully, but these errors were encountered: