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
quadossquadoss 

Query_Timeout error occurs while running during night

Hi,
 
I am encountering an query_timeout error during night time.
 
Detailed information as follows
1. No Network glitched
2. Query returns 25 - 26 records per day
3. The project works properly till 9:00 Pm and i have scheduled to run at 3:15 Am where it failes every time.
4.  FYI, saw in below statement in one of the forum "Queries that take longer than two minutes to process will be timed out. For timed out queries, the AppExchange Web service returns an ExceptionCode of QUERY_TIMEOUT. If a timeout occurs, refactor your query to return or scan a smaller amount of data." 
 
 
Please help as this is a critical issue for us.
benjasikbenjasik
You'll need to log a case for this.  We'll also probably need login access to your org so we can try and reproduce it, and we'll need to know the exact query you are running.

We can either remove the 2 minute timeout, or try and improve the query (custom index, or something else)
quadossquadoss
Hi,
 
Thanks a lot for the information. Yes it worked fine after adding a custom index.