My Account | Internet Creations
Welcome, Guest.

System.LimitException: Too many SOQL queries / Too many DML statements


You are working with an Internet Creations application and encounter an error similar to the following: System.LimitException: Too many SOQL queries / System.LimitException: Too many DML statements / 554.


Per Salesforce Governor Limits, users are allowed up to 100 Synchronous (200 Asynchronous) SOQL queries and 150 DML statements per each transaction they perform. If you're encountering a Too many SOQL queries or Too many DML statements error, this indicates that the Apex code (all combined) which was invoked during an execution exceeded the respective Salesforce Governor Limit.

If you're using an Internet Creations application when encountering these errors, you may notice the error message prefaced with the namespace of one of our applications.

For example, if you were to run into this governor limit when utilizing the Email to Case Premium email service, you may see the error message display such as the following:
The apex class E2CP.ProcessMessage failed due to: System.LimitException: Too many SOQL queries: 101

This error can present itself in different ways. In some instances, the error message is followed by a stack trace of which line of code the execution had failed on.
  • If the Apex Classes / Triggers mentioned in the stack trace include the namespace reference matching an Internet Creations application (i.e E2CP for Email to Case Premium, FLAGS for Case Flags & csmrgp for Case Merge Premium), please open a support case with Internet Creations support by sending an email to
  • If the Apex Classes / Triggers do not include the namespace reference to an Internet Creations application, this error was likely caused by SOQL / DML usage exceeded either in the local (default) namespace or within the code execution of a separately managed package.

In the event the error message provided doesn't include any information other than System.LimitException: Too many SOQL queries or System.LimitException: Too many DML statements, please open a support case with Internet Creations support by sending an email to As part of opening a new support case for this issue, please provide us with the full error message you had received, steps to replicate the issue (if known), and login access to your Salesforce Org where the issue had occurred.

In order to identify what code is consuming the SOQL / DML resources, Internet Creations will need to be able to replicate the error and collect a debug log. In order to capture specific information regarding our managed package(s), this debug log must be collected via login access from our side, as debug logs captured locally will automatically hide any specific operations / processes that occur when accessing a packaged component. More information on granting login access to Internet Creations can be found here.

For additional reference on these errors, please see the following articles:

For the Email to Case Premium error example shown above, common causes of this error include:

1. More than 30 recipients included on an Inbound Email.
2. Local automation interfering with Email to Case Premium's automation.

Note: Internet Creations support cannot assist with Governor Limit errors caused by code running outside of what comes packaged with our applications. However, if you require further assistance with updating the SOQL query logic within your local code, please contact your Internet Creations Account Executive to inquire about professional services.


Additional Information


Open a Case