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
SFDC New UserSFDC New User 

Apex Class - @future callout delay in processing

Hi,

Does anyone used @future call in apex class to callout to external web service for data sync?

How is the performance of the response time? 

We have a situation with the @future callout. Normally the job will be queued and usually finished processing almost instantly. However, in certain hour during the day e.g. 5pm, the time between queue and finally processed will take up to an hour or so. 

The number of jobs being process every hour is quite even. Does anyone know what could be the cause? 

Thank you.



NehalNehal (Salesforce Developers) 
Hi,

There is no SLA on asynchronous processing (i.e. future jobs, scheduled Apex jobs, scheduled dashboards).

Delays in processing are typically due to one of the following reasons:

>> One or more organizations in the same db node send a large number of async jobs, which reduces dequeuing latency for jobs sent from other orgs. While these orgs' messages will be throttled, higher number of messages will mean messages from other orgs might still need to wait longer.

>> One or more organizations in the same db node send jobs that take a considerable amount of time, thus holding onto the threads for longer and reducing dequeuing latency.

>> Also your job can be in queued status

>> Asynchronous requests are processed as quickly as possible governed by available resources and flow controls. There is no guaranteed processing time.

I hope this helps.
SFDC New UserSFDC New User
Hi Nehal,

Thank you for your advise.

Will the reasons generally apply to all the orgs located in the same server (e.g. ap1)? Or only certain orgs will be affected?

Also, will the different edition type affect the queueing priority too? e.g Enterprise vs Performance?

Could you also share how does the queuing mechanism works?

Thank you.