Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Limit on Enqueued Deployments from Apex
When you reach the limit, you receive this exception as an API response in Apex.
1[
2{
3 "message" : "The service received too many metadata deployment requests from Apex and doesn’t have the resources to accept new requests",
4 "errorCode" : "System.AsyncException"
5}
6]
7The limit applies only to enqueued Metadata API deployments that originate from Apex. It doesn’t affect Metadata API deployments from Salesforce CLI, change sets, or packaging. The limit does apply if a package contains Apex that triggers metadata deployments. It also applies to the Metadata.Operations.enqueueDeployment() Apex method. This limit applies to all Salesforce editions.