Skip to content

Fix Jetty virtual threads configuration#50970

Closed
arnabnandy7 wants to merge 1 commit into
spring-projects:mainfrom
arnabnandy7:bugfix/jetty-virtual-threads-timeout
Closed

Fix Jetty virtual threads configuration#50970
arnabnandy7 wants to merge 1 commit into
spring-projects:mainfrom
arnabnandy7:bugfix/jetty-virtual-threads-timeout

Conversation

@arnabnandy7

Copy link
Copy Markdown

Fixes #50929.

When Jetty and virtual threads are used with Actuator configured on a separate management port, the application can stop responding on Windows after 60 seconds of inactivity.

This change configures Jetty with a QueuedThreadPool and sets the VirtualThreadPool as its virtual-threads executor, rather than using the VirtualThreadPool directly as the server thread pool. This keeps Jetty infrastructure tasks on platform threads while application tasks can use virtual threads.

The existing test has been updated to verify the new thread-pool arrangement and that the configured maximum thread count is retained.

Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 18, 2026
@mhalbritter

Copy link
Copy Markdown
Contributor

Thanks, but we're configuring virtual threads on Jetty as stated in their documentation. The issue you linked is something which only appears on Windows, and therefore should be fixed in Jetty, not in Spring Boot.

@mhalbritter mhalbritter added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: declined A suggestion or change that we don't feel we should currently apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spring boot app stops responding after 60+ secs of inactivity when Jetty and Virtual Threads are used.

3 participants