What are governor limits in Salesforce?

Governor limits are runtime limits enforced by the Apex runtime engine. Since Apex runs in a shared, multitenant environment, the Apex runtime engine strictly enforces a number of limits to ensure that code does not monopolize shared resources.

Types of limits that Apex enforces are resources like

1. Memory
2. Database resources
3. Number of script statements to avoid infinite loops
4. Number of records being processed. If code exceeds a limit, the associated governor issues a runtime exception.

Because Apex runs in a multitenant environment, the Apex runtime engine strictly enforces a number of limits to ensure that runaway Apex doesn’t monopolize shared resources. If some Apex code ever exceeds a limit, the associated governor issues a runtime exception that cannot be handled.

The Apex limits, or governors, track and enforce the statistics outlined in the following tables and sections.

1. Per-Transaction Apex Limits
2. Per-Transaction Certified Managed Package Limits
3. Force.com Platform Apex Limits
4. Static Apex Limits
5. Size-Specific Apex Limits
6. Miscellaneous Apex Limits

Cheers!!!

No comments:

Post a Comment