Ah my fault, I actually inherited this codebase and didn't realize that the developers are actually creating a client per request. I think I'm hitting another issue which I'm not sure how to describe.
is basically what they're doing.
That project actually will reproduce this issue. Requests to the "fast" endpoint are fine:
<html><body><h1>OK</h1></body></html>
But if I make several requests to
http://app.s5srv.com/slow.php which times out and then make a request to the "fast" endpoint I seem to get a TimeoutException even thought I would assume the HttpClient instances aren't shared.
You'll notice the vertx process outputs:
ERROR
java.util.concurrent.TimeoutException: The timeout period of 1000ms has been exceeded while executing GET /slow.php?q=notslow&i=REQUESTED for host app.s5srv.com
at io.vertx.core.http.impl.HttpClientRequestBase.timeout(HttpClientRequestBase.java:178)
at io.vertx.core.http.impl.HttpClientRequestBase.handleTimeout(HttpClientRequestBase.java:163)
at io.vertx.core.http.impl.HttpClientRequestBase.lambda$setTimeout$0(HttpClientRequestBase.java:121)
at io.vertx.core.impl.VertxImpl$InternalTimerHandler.handle(VertxImpl.java:885)
at io.vertx.core.impl.VertxImpl$InternalTimerHandler.handle(VertxImpl.java:844)
at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:339)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:745)
On fast got: ERROR
So I'm not clear on what's going on.
Thanks!