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

Investigate if we can stop ServiceRequestContextBuilder.build() from scheduling an event loop task #5683

Open
trustin opened this issue May 17, 2024 · 1 comment

Comments

@trustin
Copy link
Member

trustin commented May 17, 2024

DefaultCancellationScheduler.initAndStart() and (CancellationScheduler.finished()) is called by {Service,Client}RequestContextBuilder.build() here. initAndStart() and finished() schedule some of its work to run in an event loop.

This behavior can cause the task queue of the EventLoop to grow unexpectedly big and even trigger OutOfMemoryError under load.

We could prevent this by making the following changes:

  • Provide a way to disable cancellation scheduler completely so that no task is scheduled; and
  • Consider making it the default behavior.
@Bue-von-hon
Copy link
Contributor

If no one volunteers by the end of this week(5/24), I'll take the challenge.

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

No branches or pull requests

2 participants