Page 1 of 1

Batch proc stopped/crashed

PostPosted: Wed Apr 21, 2021 11:51 am
by jdbruijn
Is it possible to get some kind of warning when a batch proc has stopped working?

Re: Batch proc stopped/crashed

PostPosted: Wed Apr 21, 2021 12:54 pm
by mboegem
what happened to the idle time in that case?
Does that stop updating as well?

In that case you can report on headless clients with an idle time older than xxx min/hrs/days, whatever the interval of the action is that you execute in the batch processor.

Otherwise, set a date into the database each time you execute an action in the batch processor.
Report on that date when it's older than xxx min/hrs/days

In both cases, it should be a 2nd process that will check.

More interesting is why it crashes.
Are you using a cronjob?
Have seen that stopping in the past 'without reason'.

Fixed it when I changed it to schedule single jobs and let the job re-schedule itself again.
You can also think of the main batch processor just spawning additional headless clients in order to execute the actual job.

A couple of ideas, hope one of those can resolve your issue.

Re: Batch proc stopped/crashed

PostPosted: Wed Apr 21, 2021 1:14 pm
by jdbruijn
When I look at the clients it is not shown there anymore, but when I look at the batch proc page there it still says status: Is running.
So Idly time will not really help me.
We have talked earlier about spawning separate clients when a job is triggered, maybe it is about time we implement this.
However I would expect the server to be able to notify me if a batch job is no longer running, I see that as part of its job.

Re: Batch proc stopped/crashed

PostPosted: Wed Apr 21, 2021 1:35 pm
by mboegem
jdbruijn wrote:However I would expect the server to be able to notify me if a batch job is no longer running, I see that as part of its job

There could be multiple reasons why a batchproc stops.
- client just disappears (your case)
- code stopped (due to programming issue)
- cronjob issue

As the trigger depends, it's hard to implement 1 solution.

Writing your own shouldn't be much work.