-
Notifications
You must be signed in to change notification settings - Fork 664
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
io.netty.handler.ssl.SslHandshakeTimeoutException: handshake timed out after 10000ms #1617
Comments
@violetagg for your question #907 (comment) The below code provide the preperties |
@uvarajk What's the idea of having |
We initially included ReadTimeoutHandler to check if it the time taken to read the response. As it did not work we have added ResponseTimeout. |
@uvarajk Without knowing the scenario and how the client is used is very hard to say what causes this. |
@violetagg If I understand your question right, below is my explanation. |
@uvarajk OK so you are using WebClient. Can you give some coding, how you use it? |
@violetagg please find the attached code for reference and starts with the below get method public Mono get(String endpoint, Map<String, String> headers, Class responseClass) |
@uvarajk You are creating WebClient always, why don't you share it? Is it possible that you overload the downstream system. Do you use blocking or non-blocking on the downstream system? Did you check the load on the downstream system? |
@violetagg I think spring internally uses singleton for the webclient. However, the concern is why the timeout's are not considered, although we have connection timeout, read timeout and response timeout configured. Whether the code needs correction for the timeout to be effective. |
@uvarajk can you add
|
@violetagg Sorry, it took a bit more time to fetch those logs since it is from production. This occurs only after 4 to 5 hours after deployment. 2021-04-30 09:32:18.840 : [id:18009796, L:/10.200.61.65:42856 - R:172.25.0.12/172.25.0.12:443] Registering pool release on close event for channel |
@violetagg any clue why the timeout's are being ignored. Have you checked the Debug logs. |
@uvarajk If you do not increase the I/O workers count |
@violetagg Yes we see the issue, the timeout's are not considered even without the ioWorkerCount configuration. |
@uvarajk Is it possible that you run blocking/log running operations in the event loop? For blocking operations you can use |
@violetagg Thanks, will check on that as I've never come across the BlockHound. Will try to implement. |
Yes this should be enough |
@uvarajk Were you able to install BlockHound? |
@uvarajk Let me close this, if you are able to provide the requested information we can reopen the issue. |
@violetagg please keep it open. I've just got the approval to include the BlockHound |
@uvarajk Were you able to install BlockHound? |
@uvarajk Let me close this, if you are able to provide the requested information we can reopen the issue. |
Versions :
Reactor Netty : reactor-netty-http-1.0.5.jar, Java : 11.0.8 (N/A) , Linux : 4.15.0-133-generic
We're receiving the SSL Handshake Timout Exception in our production environment.
Captured few details for the reference those are mentioned below :
In the Debug Log below are the default connection pool configurations
r.n.resources.PooledConnectionProvider : Creating a new [http] client pool [PoolFactory{evictionInterval=PT0S, leasingStrategy=fifo, maxConnections=500, maxIdleTime=-1, maxLifeTime=-1, metricsEnabled=false, pendingAcquireMaxCount=1000, pendingAcquireTimeout=45000}] for [/172.25.0.12:443]
We are able to see that the application is working fine for some time(4 to 5 hours) and slowly the responses are received late
Taken <<24442>> milliseconds to retrieve data from endpoint
Taken <<32875>> milliseconds to retrieve data from endpoint
Taken <<2532046>> milliseconds to retrieve data from endpoint
During the delayed responses following are the errors/exceptions
io.netty.handler.timeout.ReadTimeoutException: null
io.netty.handler.ssl.SslHandshakeTimeoutException: handshake timed out after 10000ms
We have configured the following timeout's for the HTTPClient
web-client.connect-timeout=5
web-client.read-timeout=5
web-client.use-connection-pooling=true
reactor.netty.ioWorkerCount=128
web-client.response-timeout=5
It would be a great help if we could know what's going wrong.
The text was updated successfully, but these errors were encountered: