Skip to content

Fix Jetty virtual threads configuration#50970

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

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.

2 participants