Skip to content

Emit warning when ThreadPoolTaskScheduler is unable to meet task delay #33856

Open
@DanielThomas

Description

@DanielThomas

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions