-
Notifications
You must be signed in to change notification settings - Fork 1.2k
make server threads configurable with server.properties file #11540
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11540 +/- ##
=========================================
Coverage 17.35% 17.35%
- Complexity 15232 15236 +4
=========================================
Files 5888 5888
Lines 525733 525733
Branches 64164 64164
=========================================
+ Hits 91255 91266 +11
+ Misses 424178 424168 -10
+ Partials 10300 10299 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR makes the Jetty server thread pool configuration configurable through the server.properties file instead of being hardcoded. Previously, the minimum and maximum thread counts were fixed at 10 and 500 respectively.
Key changes:
- Added configurable thread pool properties with defaults matching the previous hardcoded values
- Replaced hardcoded thread pool configuration with property-based configuration
- Added documentation for the new configuration options
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ServerDaemon.java | Added thread pool configuration properties and replaced hardcoded values with configurable ones |
| server.properties.in | Added commented configuration examples for the new thread pool settings |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| setMinThreads(Integer.valueOf(properties.getProperty(THREADS_MIN, "10"))); | ||
| setMaxThreads(Integer.valueOf(properties.getProperty(THREADS_MAX, "500"))); |
Copilot
AI
Sep 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing input validation for thread configuration values. The code should validate that minThreads > 0, maxThreads > 0, and minThreads <= maxThreads to prevent invalid thread pool configurations that could cause runtime issues.
| setMinThreads(Integer.valueOf(properties.getProperty(THREADS_MIN, "10"))); | |
| setMaxThreads(Integer.valueOf(properties.getProperty(THREADS_MAX, "500"))); | |
| setMaxThreads(Integer.valueOf(properties.getProperty(THREADS_MAX, "500"))); | |
| // Validate thread configuration | |
| if (minThreads <= 0) { | |
| logger.warn("Invalid minThreads value (" + minThreads + "). Setting to default (10)."); | |
| setMinThreads(10); | |
| } | |
| if (maxThreads <= 0) { | |
| logger.warn("Invalid maxThreads value (" + maxThreads + "). Setting to default (500)."); | |
| setMaxThreads(500); | |
| } | |
| if (minThreads > maxThreads) { | |
| logger.warn("minThreads (" + minThreads + ") is greater than maxThreads (" + maxThreads + "). Setting minThreads to maxThreads."); | |
| setMinThreads(maxThreads); | |
| } |
JoaoJandre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLGTM
|
I am going to assume testing is still valid from the original ticket (leaving on the edge) cc @rosi-shapeblue |
…11540) Co-authored-by: Ahmed Awlaqi <[email protected]> Co-authored-by: Daan Hoogland <[email protected]>



Description
This PR resolves conflicts in #9260
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?