Cancel long running jobs

84 views
Skip to first unread message

Toni Schoenbuchner

unread,
Jun 14, 2021, 9:30:35 AM6/14/21
to AtoM Users
Hello,

during testing a migration a job is running for some hours. How can I cancel it safely? I'm in the docker context but would be interested in a non-docker way as well as for sure I can adjust the command to my need. (there isn't a gui option, is there?)

What I've tried so far.

Restart service atom_worker and gearmand

What I haven't tried yet but think of doing it. Kill the atom_worker process

   13     1 root     S    39312   0%   4   0% php /atom/src/symfony jobs:worker

But this feels a bit like working with a hammer on a needle.

thanks for any advice,

Toni

Dan Gillean

unread,
Jun 14, 2021, 9:41:20 AM6/14/21
to ICA-AtoM Users
Hi Toni, 

We don't have an easy way in the GUI to kill individual jobs when they stall out, but there are a couple options when you have access to the command-line. 

First, if you want to kill all running jobs, we have a task for that: 
  • php symfony jobs:clear
  • It's covered in this section of the Troubleshooting documentation. In 2.7 I hope to overhaul the job scheduler page to make sure that all relevant management information is available in one place. 
Keep in mind that this task will clear ALL jobs, including the history of those already completed, as well as any that are currently queued behind the stalled job. So, it's kind of a hammer as well, but one with official task support. 

If you want the "needle" option, for now we need to use SQL to kill specific jobs. We've added some instructions on how to do so here: 
Hope that helps!

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/7b1f5e83-de4f-4dc1-8728-ff7eab212094n%40googlegroups.com.

Toni Schoenbuchner

unread,
Jun 14, 2021, 9:46:39 AM6/14/21
to AtoM Users
perfect, thanks a lot Dan. Will test it right away ;)

Toni Schoenbuchner

unread,
Jun 14, 2021, 9:48:57 AM6/14/21
to AtoM Users
Just as a note, I guess when running jobs:clear:

this warning 

WARNING: AtoM reports there are jobs currently running. It is *highly* recommended you make sure there aren't any jobs actually running. i

is actually to say that you will kill currently running jobs ?! (which is my goal in that case)

Dan Gillean

unread,
Jun 14, 2021, 10:04:55 AM6/14/21
to ICA-AtoM Users
Yes! 

This warning is added because this task can also be used to clear out the history of previous completed jobs - so it acts as a warning in case some other user has triggered a job in progress before the command is run. However, it can also be used as you are intended to use it - to purposefully kill an active stalled job.

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Reply all
Reply to author
Forward
0 new messages