spring-projects / spring-projects/spring-framework
Emit warning when ThreadPoolTaskScheduler is unable to meet task delay
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 60.2k
- Forks
- 38.8k
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 27
Description
It seems like a pretty common gotcha for applications with more than one type of scheduled task to run into issues when those tasks are long running and the default value for spring.task.scheduling.pool.size is 1.
Virtual threads in Spring Boot obviously helps mitigate this, but for other uses if ThreadPoolTaskScheduler had a dedicated thread to peek the queue and determine if the next RunnableScheduledFuture delay had expired and log a warning, that would make it far easier to diagnose when thread starvation is preventing tasks from running on schedule.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ThreadPoolTaskScheduler and trace how its scheduled queue exposes RunnableScheduledFuture delays. Confirm how an overdue task can be detected without disrupting scheduling, then define the warning behavior for thread starvation and verify that long-running tasks produce a useful warning when later tasks miss their delay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100