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
jontkjontk 

QueryMore lifespan

Is there a time limit as to how long a querymore locator/cursor will live even if I'm actively calling it to get additional records?

I am trying to retrieve about a million records which takes 5+ hours and am getting the error below around 5 hours in:

UNKNOWN_EXCEPTION: An unexpected error occured. Please include this ErrorId if you contact support: 1266558833-34

Thanks,
Jon
SuperfellSuperfell
That should work, you should call support.
dhruvadhruva
Are you trying to process in the middle of your calls?  i.e. is your sequence:
(a) query, process, querymore, process, querymore, ..., or
(b) query, querymore, querymore, ..., process?

I used to do (a) and had the queryLocator expiring.  I've switched to (b).

RamiRami

I have some questions regarding the solution, if you have the answers please post in this thread or email to Rami.Kalayanaraman@cit.com

What batch size are you using?

 Is the query a Join?

Are there processes possibly querying the same account?

Please let me know. Thanks in advance for your help 

Thanks,

Rami

jonkwonjonkwon
Does calling querymore reset the lifespan of a cursor (which is 5 minutes???)

Thanks,
Jon
SuperfellSuperfell
the cursor is expired if it hasn't been used (i.e. queryMore called) in the last 15 minutes (not 5).