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
zdooderzdooder 

System.LimitException: The daily limit for the org would be exceeded by this request

About three weeks ago, some of the Leads generated by our Lead process were not properly handled, and I got the following e-mail about it:

 

Apex script unhandled trigger exception by user/organization: 00580000001iTe7/00D80000000xxxx

LeadAfterInsert: System.LimitException: The daily limit for the org would be exceeded by this request

 

I looked into the governor limits and tried to determine what was going wrong, but within 24-hours the situation resolved itself.  I opened a case with developer support but they have not been able to tell me what the problem is yet.  I had hoped it was a one-time thing I wouldn't see again.
However, this morning I started getting these notices again.  I also noticed in the meantime that the exception isn't the type I'm used to seeing -- normally there is a stack trace indicating where the exception was thrown from.  This seems to indicate that the trigger was not run at all because of the exception.
We're not using any of the things that I've seen that have daily limits (sites, future methods) and our API requests are around 3k/18k.  I'm clueless as to where to look to figure this out.  I'm currently looking into the 1000-address per day email limit, but this trigger does not send email as far as I know.
Thanks in advance for any ideas you might be able to offer!
Troy
IspitaIspita

Hi zdooder,

From message you are getting it seems that perhaps the email sending limit of the org has been hit in case you are sure about not hitting the API usage limits.

Does your lead process send out emails ? If yes probably that is the limit you are hitting ? Also all these limits are defined for a period of 24 hrs. so time elapses these limits are release in a sliding window fashion.

Also refer to the following links for clarity:-

 

 

Hope this helps.

 

 

zdooderzdooder

Hello Ispita,

 

Thanks for your sugestions.  I do not believe we're hitting an API limit because the API request (to upsert the Lead) is already executing when the exception is thrown.  Only the trigger is not executed.  (Plus just to be safe, I verified that we had used less than 4k of our 18k allowed API accesses.)

 

The lead process does not directly generate any e-mail.  The lead comes from our Marketo instance, and Marketo sends some e-mails.  The trigger also creates a custom object, and the workflow rules for that object send an outbound message to our website on object creation, and when our SOAP service receives the outbound message, it generates the e-mail message.  (We did this so that we could easily brand the e-mails for our OEMs and partners.)  So I do not believe that it is a daily e-mail limit, although I haven't found a way to determine that definitively (it doesn't seem to appear anywhere under 'Setup' and is not part of the "Limits" global accessible to me via APEX).

 

The reference to EMAIL_BATCH_SIZE_LIMIT_EXCEEDED is interesting, but we're not doing any batched e-mail processing either. :(

 

But again, thanks for your suggestions. If nothing else, it's nice to know that it's not completely obvious to everyone but me :).

 

Troy