7

Is there a way to find out which user aborted a batch job?

I randomly see batch jobs abort without a reason (in the logs I see an Internal Salesforce error to happen around the time of abortion) and I am unsure if this is an error that lead to an automatic abort or if a user aborts the job.

Have you ever seen batchs abort automatically for no obvious reason? Do you know how to find out who aborted it?

6
  • 1
    If a batch job is aborted with an Internal Salesforce error it is often the case that the query in the start() method took too long and timed out. Jul 9, 2013 at 11:33
  • @PhilHawthorn: This cannot be the case here as the batch succesfully finished 3000 other batch jobs. Jul 9, 2013 at 11:57
  • 1
    It will almost certainly be the Internal Salesforce error aborting the job. Timeouts can also happen in execute() too, I would concentrate on finding out what the salesforce error is first. Jul 9, 2013 at 18:02
  • Already opened a case.. Jul 9, 2013 at 18:54
  • 1
    Bump! Any updates on this? It started happening in one of our orgs too, no clue what's going on... Sep 23, 2014 at 6:16

1 Answer 1

2

It happened in our production org also. In forums different reasons are listed.

  • If your start query is taking more than 2 minutes to run, salesforce will auto abort the batch and it will show error message "Aborted by User"
  • In our case it looks like it was some permission issue. Our batch is triggered from another one class. If it is executed by System Administrator, batch is executing smoothly. But if I use another user with permission to all of these classes, it is giving the error "Aborted by User".
2
  • Actually, the limit is now 10 minutes (from some recent release), but the effect is the same.
    – sfdcfox
    Feb 23, 2015 at 18:29
  • We raised a support ticket with Salesforce and with their help we found the query that was timing out. It was a query inside "Execute" method of batch. Support team helped us to index a formula field which is used as filter in the query. Now it is running without any problems.
    – Victor
    Feb 27, 2015 at 1:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .