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

Replace QuietTimeoutStage with IdleTimeoutStage in server #2244

Merged
merged 2 commits into from Nov 6, 2018

Conversation

Projects
None yet
3 participants
@rossabaker
Member

rossabaker commented Nov 5, 2018

This fixes #2229. Instead of a QuietTimeoutStage that loudly sends exceptions up and down the pipeline, this lets the HTTP server stages manage and respond to their own timeouts.

Also gets rid of the global TickWheelExecutor on the server side.

@@ -25,7 +25,7 @@ final private[http4s] class IdleTimeoutStage[A](
override def run(): Unit = {
val t = new TimeoutException(s"Idle timeout after ${timeout.toMillis} ms.")
logger.debug(t.getMessage)
cb(Left(t))
cb(Right(t))

This comment has been minimized.

@rossabaker

rossabaker Nov 5, 2018

Member

Lets us distinguish our timeout from someone else's timeout.

case Left(t) =>
fatalError(t, "Error in idle timeout callback")
case Right(_) =>
logger.debug("Shutting down due to idle timeout")

This comment has been minimized.

@rossabaker

rossabaker Nov 5, 2018

Member

We could argue logging level here. Should perhaps be consistent with the "accepted connection" level.

This comment has been minimized.

@ChristopherDavenport

@rossabaker rossabaker force-pushed the rossabaker:issue-2229 branch from 6e578a6 to 7bc9508 Nov 6, 2018

@rossabaker rossabaker referenced this pull request Nov 6, 2018

Merged

Release v0.20.0-M2 #2247

@rossabaker

This comment has been minimized.

Member

rossabaker commented Nov 6, 2018

Appveyor OOM is unrelated.

@aeons

aeons approved these changes Nov 6, 2018

@aeons aeons merged commit 9d18da8 into http4s:master Nov 6, 2018

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment