about connection timeout #2138
Replies: 3 comments
|
I will jump on update part; Did you mean AHC Config for Connection Timeout is not working, but setting it directly in Netty Bootstrap makes it work? But in general, there are 2 parts. Connection timeout is simply a TCP connection not being established. Request timeout when TCP connection succeeds but the server did not respond to the request within N time. Can you help me with a reproducer AHC config? |
|
The problem was on my side: I have a dynamic update configuration, which update timeouts(update atomic with AHC) and program should init force update by event on start, but it's not working cleanly. Today while I collect logs for you I found this bug.
P.S: it's not so easy to find address where I can get connection times out) But it should be any free port on localhost? Maybe it appears because I tested it on windows. Anyway now it works correctly. |
|
Try connecting to 1.1.1.1 on 6xxxx ports like 62762. It will simulate a real connection timeout because localhost is not reliable since it can vary system-by-system. $ telnet 1.1.1.1 62762
Trying 1.1.1.1...
telnet: Unable to connect to remote host: Connection timed out |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi
I use async-http-client ver. 3.0.5 in my project.
I use timeouts with values:
connection timeout = 2000 millis
request timeout = 4000 millis
read timeout = 4000 millis
I make a lot of test trying to get Connections timeout to localhost free port, to random IP and non-existent url.
My guess: i should get Connection timeout if port is free, but i always get request time. Request timeout should appear when all request processing time is more than 4000 millis.
Am I wrong? Why?
I upgraded version form 2.12.3 and previously i can get Connection timeout, but I can't manage it. It was always 5000 millis
UPD: As I understand async-http-client not working directly with this parameter and only setting it on channel bootstrap in netty?
All reactions