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

Swap default min and background thread limits #177

Merged
merged 1 commit into from
May 7, 2024

Conversation

chris-allan
Copy link
Member

Having the background counting semaphore count greater than the minimum thread count (which is actually the maximum) can cause the server to lock up when background tasks consume all these threads. Here we are switching these defaults so that's no longer possible. The only downside to this change is that the background counting semaphore will now be exhausted at 5 tasks rather than 10.

This is an interim solution to #159.

Copy link
Contributor

@kkoz kkoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I think we need to revisit #159 and have a deeper discussion about whether we want these sorts of requests to block (as they will whenever the Semaphore count is exceeded) or queue up (as they did when min_threads < open requests < background_threads). What we have right now seems to me like an odd mixture of the two.

@dominikl
Copy link
Member

👍 Looks good to me too.

@jburel jburel merged commit c04dd0e into ome:master May 7, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

5 participants