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

Allow configuring dispatcher 'maxRequestsPerHost' #264

Open
checketts opened this issue Nov 16, 2022 · 0 comments
Open

Allow configuring dispatcher 'maxRequestsPerHost' #264

checketts opened this issue Nov 16, 2022 · 0 comments

Comments

@checketts
Copy link

checketts commented Nov 16, 2022

In developing some code that produces/consume a lot of message, I found that the default appender would get backed up, causing log messages to queue up, chewing up memory until the application crashed. This appears to have been due to the default OKHttp dispatcher only allowing 5 calls 'per host' at a time.

I added the ability to access the Dispatcher from the Logback appender in the code and was able to set the maxRequestsPerHost to 30 and that fixed my problem.

Would that change be welcome as a PR?

Exposing the Dispatcher also gave me access to the ready and running queue sizes, so I was able to set those up as metrics and get much better insight into what was clogging the system and how I might address it.

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