function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
cml.slscml.sls 

Apex Job Aborted By User

Hi, we've just tried to ask salesforce via a case why an Apex job is marked as aborted by User (when each User denies such knowledge) and they seem to think it's a developer request and pointed us here.

Case #11212305
Original request:
Hi, please can you let me know why the batch was "Aborted By User" as no one has aborted a job. Also can you state what the underlying error is - if there is one?
Apex Job Id: 7072000000vWcRV

Since this is an internal issue, I'm assuming the only folks who can help us the Salesforce employees who patrol these boards?

Thanks in advance.
 
SonamSonam (Salesforce Developers) 
Thanks for posting the details here, I will check your case and update you with my findings..
cml.slscml.sls
Hi Sonam,

Salesforce support have closed the case stating that these boards should be used.
The Batch job states the job was aborted by a User, who denies doing so (this has now happened twice) - this affecting the User concerned so I doubt they are ruining their own process!

Please can you advise what the reason for abort was?

Thanks.
cml.slscml.sls
Hi Sonam or anyone at Salesforce.... just raised another case to be pointed here again regarding aborted batches. New case #11330544. Same issue. Are you able to help?
john4sfdcjohn4sfdc
Hi Cml,
I t happened in our org some time back and the batch was beeing failed and the reason was aborted by user. When i read the debug log, I saw an Internal Salesforce error. The salesforce.com support asked me to add filters in one of my queries which was taking very long time. Hope this helps
Juan SpagnoliJuan Spagnoli
You are experencing timeout problems, your query is running for more that 2 minutes so Oracle abort it. You need to optimize the query, to do that you need to focus on filters, check if you are using Indexed fields (Lookup Values, System fields, External Ids), if you are not, you can try creating one using "External ID" option or asking to support to create the index for your. The last thing that you can do, only if indexing doesn't help, is ask support to Create a Skinny Table for the object.

Here you have a lot of documentation about High Volumen Data, welcome to the world of timeouts ;)

READ => https://developer.salesforce.com/blogs/engineering/2013/07/maximizing-the-performance-of-force-com-soql-reports-and-list-views.html
READ => https://help.salesforce.com/apex/HTViewSolution?id=000181277&language=en_U
READ => https://help.salesforce.com/apex/HTViewSolution?urlname=How-can-I-make-my-SOQL-query-selective-And-the-process-to-determine-the-fields-that-can-be-custom-indexed&language=en_US

Extra:
https://developer.salesforce.com/page/Webinar:_Inside_the_Force.com_Query_Optimizer_(2013-Apr)
https://developer.salesforce.com/blogs/engineering/2013/03/long-and-short-term-approaches-for-tuning-force-com-performance.html
https://developer.salesforce.com/page/Best_Practices_for_Deployments_with_Large_Data_Volumes

IMPORTANT => Use this tool to check if your queries are "selective":

https://help.salesforce.com/apex/HTViewSolution?id=000199003&language=en_US

Good luck!