jetty / jetty/jetty.project

Limit ReservedThread creation

Open
#13,707 7 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
Java
Stars
4.1k
Forks
2k
Avg merge
3d 56m
Merged PRs (30d)
48

Description

**Jetty version(s)**
12.1.x

**Description**
If all the threads of a thread pool are taken, and a new request arrives, the job to handle the request is queued, but also the task for a new ReservedThread.

We should count how many pending ReservedThread we attempted to start, and stop when we reach the capacity, to avoid to continuously queue ReservedThread tasks to the thread pool.

A dump showed ~2700 tasks for ReservedThread, which is obviously much more than the ReservedThreadExecutor capacity.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the ReservedThreadExecutor and its thread-pool submission path described in the issue. Check how pending ReservedThread starts are counted against executor capacity, and verify with the relevant Jetty tests that queued ReservedThread tasks cannot grow beyond that capacity.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.