Skip to content

When virtual threads are enabled, embedded Jetty does not use recommended virtual thread configuration #47690

@nstdio

Description

@nstdio

When running Spring Boot web application with spring.threads.virtual.enabled=true the JettyVirtualThreadsWebServerFactoryCustomizer creates and configures QueuedThreadPool and sets it on factory. Please note following default values:

  • server.jetty.threads.min=8
  • server.jetty.threads.max=200
  • server.jetty.threads.idle-timeout=60000ms

This results in virtual threads being reused which I believe is not advised. Also documentation indicates org.eclipse.jetty.util.thread.VirtualThreadPool as preferred way to configure virtual threads support.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions