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

Strange count of HTTP server active requests when timeouts #1263

Open
joelvim opened this issue Feb 22, 2023 · 0 comments
Open

Strange count of HTTP server active requests when timeouts #1263

joelvim opened this issue Feb 22, 2023 · 0 comments

Comments

@joelvim
Copy link

joelvim commented Feb 22, 2023

Kamon 2.5.12
Play 2.8.18
sbt-kanela-runner-play 2.0.14.

We are experiencing a weird behaviour : our play application makes HTTP calls to a backend. Under certain circumstances, this backend ends up being very slow, so the response time exceeds the configured play timeout (play.server.akka.requestTimeout) of the application. When this happens, the number of active requests increases and never decreases. Other metrics don't reflect this behaviour : RAM, number of open connections, active threads, executor queue size, etc... This is the only metric that looks strange.
After having done this analysis, we ended up with two hypothesis : either play leaks some active requests or there is a problem with the count done by Kamon.
I did not find any open bug with this (the closer being this one : #992).
I had a look to the code, and I was wondering if it could not come from the case were onUpdatreamFinish or onDownstreamFinish is called (https://github.com/kamon-io/Kamon/blob/master/instrumentation/kamon-akka-http/src/main/scala/kamon/instrumentation/akka/http/ServerFlowWrapper.scala#L172). In this case, if we passed in the requestIn handler but not yet in the responseIn handler, the count could be erroneous. However, I don't know Akka HTTP graph stage API well enough to be sure this theory is relevant or not, and I don't know if it's a bug or not.

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

1 participant