+ Start a Discussion
MJ Kahn / OpFocusMJ Kahn / OpFocus 

"Missing cursor chunk" error in Batch Apex

I have a Scheduled Batch Apex job that has been running nightly for a couple of months now. The start method does a relatively simple query to get a QueryLocator for a bunch of Attachments. Last night, I got the following error message:

Subject: Developer script exception from <my org name> : 'Batch_Attachments' : java.io.IOException: Missing cursor chunk (offset 0, count 400), key: V:SFDC::x/<my org id>/T/01ga000001i0STTAA2/0.cursor

Apex script unhandled exception by user/organization: 005a0000007hfmB/<my org id>

Failed to process batch for class 'Batch_Attachments' for job id '707a000001BYsGh'

No line number - this appears to be a failure in the Batch Apex system, not in the Apex code. 

Any thoughts on what it means, why it happened, or how to avoid it in the future?

Anup JadhavAnup Jadhav
Difficult the debug but checkout the limitations of batch apex and see if you are inadvertantly violating any one of these limitations.

MJ Kahn / OpFocusMJ Kahn / OpFocus
Good thought, but no, nothing listed there seems likely.

The query returns only about 2,200 records. The logs show no other Batch Apex or Scheduled Apex jobs running at that time. The user on whose behalf the job runs was not logged in. 

For any of those, I'd expect to see some kind of specific limit error. "Missing cursor chunk" sounds like an internal error to me. I'm hoping someone from Salesforce can reply re this.
I got the same error last night.  It seems like an internal error.