Skip to content
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

Unhelpful timeout exception #3087

Closed
tomasherman opened this issue Jan 20, 2020 · 7 comments
Closed

Unhelpful timeout exception #3087

tomasherman opened this issue Jan 20, 2020 · 7 comments

Comments

@tomasherman
Copy link
Contributor

@tomasherman tomasherman commented Jan 20, 2020

Hello, i found another fairly unhelpful exception coming from http4s:

java.util.concurrent.TimeoutException: Request timeout after 10000 ms
	at org.http4s.client.blaze.BlazeClient$$anon$1.run(BlazeClient.scala:152)
	at monix.execution.schedulers.TracingRunnable.run(TracingRunnable.scala:33)
	at monix.execution.internal.InterceptRunnable.run(InterceptRunnable.scala:27)
	at monix.execution.internal.forkJoin.AdaptedForkJoinTask.exec(AdaptedForkJoinTask.scala:27)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

It would be great if we could add some context - like request that failed and maybe even IP address of the upstream that timeout out.

@tomasherman
Copy link
Contributor Author

@tomasherman tomasherman commented Jan 20, 2020

I was hoping to help out by providing a PR but i have a hard time to find all the pieces ... i think what needs to be done is to add information about IP address to BlazeConnection?

Seems like this would be a good place to put that information in: https://github.com/http4s/http4s/blob/master/blaze-client/src/main/scala/org/http4s/client/blaze/Http1Support.scala#L64 ?

@tomasherman
Copy link
Contributor Author

@tomasherman tomasherman commented Jan 20, 2020

So there is a bunch of exceptions in BlazeClient and HttpConnection ... i wonder if it would make sense to add to all of them at least the RequestKey ... thoughts?

@rossabaker
Copy link
Member

@rossabaker rossabaker commented Jan 20, 2020

Yes, you could enhance the exceptions by pattern matching Lefts. It will be the same basic tradeoffs as on the other: using the standard Java exception vs. a richer wrapper, with some opportunities to extend the standard Java exceptions like we did in 0.20.

@rossabaker
Copy link
Member

@rossabaker rossabaker commented Jan 21, 2020

Looked a bit closer. I think the timeout you're looking for is here. The RequestKey should be in scope, and we can extend that message.

@tomasherman
Copy link
Contributor Author

@tomasherman tomasherman commented Jan 21, 2020

@tomasherman
Copy link
Contributor Author

@tomasherman tomasherman commented Jan 22, 2020

I decided to improve (imho) some logging that we encountered in the wild and would benefited from, hope it's ok

@tomasherman
Copy link
Contributor Author

@tomasherman tomasherman commented Jan 27, 2020

fixed in #3089

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants