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
Richard Clarke (Artisan)Richard Clarke (Artisan) 

Batch Apex terminating early - ommon.exception.SfdcSqlException: ORA-20008:  ORA-06512: at "SNEEZY.CACCESS", line 4033 ORA-06512: at "SNEEZY.CACCESS", line 2219 ORA-06512: at "SNEEZY.CACCESS"

I have a batch apex class which terminates early.
It shows 90 batches at the start but ends early (like after 6 or 7).
There is no error shown anywhere and you would be unaware if you did not monitor the Apex Jobs page whilst running and the outputs
Once I got the email below

Developer script exception from Artisan Consulting Pty Ltd : 'ArtHubBatchRefreshCerts' : common.exception.SfdcSqlException: ORA-20008:  ORA-06512: at "SNEEZY.CACCESS", line 4033 ORA-06512: at "SNEEZY.CACCESS", line 2219 ORA-06512: at "SNEEZY.CACCESS", ...

Apex script unhandled exception by user/organization: 00528000001vObr/00D280000019EHA
 
Failed to process batch for class 'ArtHubBatchRefreshCerts' for job id '7070K00007gYqd2'
 
Debug Log:
36.0 APEX_CODE,FINEST;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,INFO
16:21:22.0 (75228)|USER_INFO|[EXTERNAL]|00528000001vObr|richard.clarke.crm@artisans.com.au|Australian Eastern Standard Time|GMT+10:00
16:21:22.0 (115864)|EXECUTION_STARTED
16:21:22.0 (120082)|CODE_UNIT_STARTED|[EXTERNAL]|01p2800000FFvEk|ArtHubBatchRefreshCerts
16:21:22.0 (7926558)|HEAP_ALLOCATE|[72]|Bytes:3
16:21:22.0 (7992833)|HEAP_ALLOCATE|[77]|Bytes:152
16:21:22.0 (8012559)|HEAP_ALLOCATE|[342]|Bytes:408
16:21:22.0 (8029514)|HEAP_ALLOCATE|[355]|Bytes:408
16:21:22.0 (8042827)|HEAP_ALLOCATE|[467]|Bytes:48
16:21:22.0 (8103414)|HEAP_ALLOCATE|[139]|Bytes:6
16:21:22.0 (8438592)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (8466161)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:21:22.0 (8498596)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (8505565)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:21:22.0 (8515708)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (8519393)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (9392689)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:48
16:21:22.0 (12992062)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:11
16:21:22.0 (13077595)|SYSTEM_METHOD_ENTRY|[15]|BatchableContextImpl.BatchableContextImpl()
16:21:22.0 (13087977)|STATEMENT_EXECUTE|[15]
16:21:22.0 (13119093)|SYSTEM_METHOD_EXIT|[15]|BatchableContextImpl
16:21:22.0 (13133278)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (13141911)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
16:21:22.0 (13147781)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
16:21:22.0 (13157695)|VARIABLE_SCOPE_BEGIN|[31]|this|Database.BatchableContextImpl|true|false
16:21:22.0 (13406180)|VARIABLE_ASSIGNMENT|[31]|this|{}|0x166910cc
16:21:22.0 (13417152)|VARIABLE_SCOPE_BEGIN|[31]|jobId|Id|false|false
16:21:22.0 (13536085)|VARIABLE_ASSIGNMENT|[31]|jobId|"7070K00007gYqZ6QAK"
16:21:22.0 (13548106)|VARIABLE_SCOPE_BEGIN|[31]|childJobId|Id|false|false
16:21:22.0 (13590645)|VARIABLE_ASSIGNMENT|[31]|childJobId|"7070K00007gYqd2QAC"
16:21:22.0 (29493860)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:21:54.410 (32410862935)|HEAP_ALLOCATE|[72]|Bytes:3
16:21:54.410 (32410929223)|HEAP_ALLOCATE|[77]|Bytes:152
16:21:54.410 (32410945957)|HEAP_ALLOCATE|[342]|Bytes:408
16:21:54.410 (32410959812)|HEAP_ALLOCATE|[355]|Bytes:408
16:21:54.410 (32410972513)|HEAP_ALLOCATE|[467]|Bytes:48
16:21:54.410 (32411000552)|HEAP_ALLOCATE|[139]|Bytes:6
16:21:54.410 (32411264679)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32411279631)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:21:54.410 (32411324675)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32411334368)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:21:54.410 (32411350748)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32411357647)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32530729988)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:22:25.730 (63730046108)|HEAP_ALLOCATE|[72]|Bytes:3
16:22:25.730 (63730091016)|HEAP_ALLOCATE|[77]|Bytes:152
16:22:25.730 (63730105554)|HEAP_ALLOCATE|[342]|Bytes:408
16:22:25.730 (63730119597)|HEAP_ALLOCATE|[355]|Bytes:408
16:22:25.730 (63730132951)|HEAP_ALLOCATE|[467]|Bytes:48
16:22:25.730 (63730157622)|HEAP_ALLOCATE|[139]|Bytes:6
16:22:25.730 (63730398901)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63730408371)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:22:25.730 (63730433621)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63730438764)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:22:25.730 (63730448310)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63730452387)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63788706067)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:22:57.591 (95591372095)|HEAP_ALLOCATE|[72]|Bytes:3
16:22:57.591 (95591416784)|HEAP_ALLOCATE|[77]|Bytes:152
16:22:57.591 (95591430909)|HEAP_ALLOCATE|[342]|Bytes:408
16:22:57.591 (95591444045)|HEAP_ALLOCATE|[355]|Bytes:408
16:22:57.591 (95591456897)|HEAP_ALLOCATE|[467]|Bytes:48
16:22:57.591 (95591481683)|HEAP_ALLOCATE|[139]|Bytes:6
16:22:57.591 (95591725948)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95591736527)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:22:57.591 (95591762152)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95591767428)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:22:57.591 (95591776900)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95591781249)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95654627602)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:44
16:23:07.952 (105952323260)|HEAP_ALLOCATE|[72]|Bytes:3
16:23:07.952 (105952365869)|HEAP_ALLOCATE|[77]|Bytes:152
16:23:07.952 (105952382437)|HEAP_ALLOCATE|[342]|Bytes:408
16:23:07.952 (105952396025)|HEAP_ALLOCATE|[355]|Bytes:408
16:23:07.952 (105952429413)|HEAP_ALLOCATE|[467]|Bytes:48
16:23:07.952 (105952459667)|HEAP_ALLOCATE|[139]|Bytes:6
16:23:07.952 (105952654436)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (105952664426)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:23:07.952 (105952689069)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (105952694141)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:23:07.952 (105952703590)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (105952707276)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (106027668844)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:23:42.50 (140050349094)|HEAP_ALLOCATE|[72]|Bytes:3
16:23:42.50 (140050407130)|HEAP_ALLOCATE|[77]|Bytes:152
16:23:42.50 (140050423197)|HEAP_ALLOCATE|[342]|Bytes:408
16:23:42.50 (140050437297)|HEAP_ALLOCATE|[355]|Bytes:408
16:23:42.50 (140050450164)|HEAP_ALLOCATE|[467]|Bytes:48
16:23:42.50 (140050478144)|HEAP_ALLOCATE|[139]|Bytes:6
16:23:42.50 (140050718139)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140050728863)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:23:42.50 (140050784891)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140050790786)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:23:42.50 (140050803790)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140050808025)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140150034903)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:24:11.638 (169638561748)|HEAP_ALLOCATE|[72]|Bytes:3
16:24:11.638 (169638635933)|HEAP_ALLOCATE|[77]|Bytes:152
16:24:11.638 (169638660810)|HEAP_ALLOCATE|[342]|Bytes:408
16:24:11.638 (169638683778)|HEAP_ALLOCATE|[355]|Bytes:408
16:24:11.638 (169638706762)|HEAP_ALLOCATE|[467]|Bytes:48
16:24:11.638 (169638748737)|HEAP_ALLOCATE|[139]|Bytes:6
16:24:11.638 (169639076008)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:24:11.638 (169639092980)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:24:11.638 (169639149215)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:24:11.638 (169639156671)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:24:11.638 (169639167841)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:24:11.638 (169639172339)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
 
Richard Clarke (Artisan)Richard Clarke (Artisan)
Note that I only got that email once.  Every time I run the batch job it gets through one more batch but still terminates early without any error message.  Capturing debug logs only reflects the jobs which completed and hence has no error details as to why the job terminates early