Replies: 1 comment 1 reply
-
Yeah, that is exactly what is expected. Then they will eventually be considered dead and rescheduled (according to DeadExecutionHandler). They will be cleaned up after 8* I think. If you have lots of dead executions, are you possibly not shutting down scheduler gracefully? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
We noticed that last_heartbeat field on the scheduler_tasks table isn't being updated on tasks with dead schedulers is this expected? We are using v14.0.3 of db-scheduler with postgres db.
We've configured the scheduler via java not application properties. As we aren't using the spring boot starter due to being outside our requirements because it creates schedulers on every node due to the @ConditionalOnMissingBean annotation on the scheduler bean defined in DbSchedulerAutoConfiguration.
final Scheduler scheduler = Scheduler.create(dataSource, aTask, bTask) .startTasks(cTask, dTask, eTask) .schedulerName(schedulerName) .threads(10) .pollingInterval(Duration.ofSeconds(10)) .pollUsingLockAndFetch(1.0, 4.0) .heartbeatInterval(ofMinutes(1)) .missedHeartbeatsLimit(4) .enableImmediateExecution() .deleteUnresolvedAfter(ofMinutes(5)) .registerShutdownHook() .failureLogging(LogLevel.ERROR, true) .build();
We noticed that the last_heartbeat field isn't being updated for tasks with dead schedulers. Am I misunderstanding the how the scheduler should be updating the scheduled_tasks table every minute including tasks that are picked by a dead scheduler (node death or some other reason) that has previously picked a task in the scheduled_tasks table.
Currently, the tasks with a dead scheduler remains on the table indefinitely. Is db-scheduler library expected to clean up any of these tasks or is it a case of manual removal somehow i.e. making a cleanup task to remove said tasks with picked by dead schedulers.
Beta Was this translation helpful? Give feedback.
All reactions