Design Automation Rate Limit and Quotas
The Design Automation service observes a rate limit and a set of quotas to ensure that all clients get sufficient service and that runaway applications don’t consume excessive resources. APS Rate Limits and Quotas describes rate limits and quotas in general.
Rate Limit
The Design Automation service has a rate limit of 100 calls per minute by an app (identified by client ID). Exceeding that limit returns an HTTP 429
response.
Quotas
Design Automation quotas limit an app’s resource consumption when using the Design Automation service.
Scope
Quotas are enforced individually for each app (identified by client ID) that uses the Design Automation service. For each application, the Design Automation quotas each apply to different elements used by the application:
- Work items (often through the activity that each work item triggers)
- Activities
- App bundles
Quota limits may differ depending on which Design Automation engine the application uses: AutoCAD, Inventor, Revit, 3ds Max, or Fusion.
The quota descriptions that follow each define the element to which the quota applies and the limit for each engine.
Work Item Quotas
These quotas limit a work item’s resource consumption. The quotas are typically different for each Design Automation engine as listed below.
Work Item Heartbeat
One work item quota is the same across all engines: a work item’s processing time (when it runs an app in an app bundle) cannot exceed one minute without a “heartbeat” to indicate that it is working correctly and not in an infinite loop. The simplest heartbeat is for the app to send output to the standard output (or trace output) stream from your code. However, if you invoke a single operation that is expected to take more than one minute (opening a large file, for example), you can send the output asynchronously. See the CSharp samplePlugin code for examples.
Activity and App Bundle Quotas
These quotas limit resource consumption by activities and app bundles. The quotas can be different for each Design Automation engine as listed below. Additionally, appbundles and activities can be shared up 30 other apps.
Quota Violation Notification
The Design Automation service reports quota violations in different ways depending on the type of quota. For work items, the service can’t determine violations when a work item is submitted and put on the job queue. Once the work item is processed, if the work item exceeds a quota then the work item fails. The best practice for determining if a work item has exceeded a quota is to use the OnComplete
callback in the GET workitems endpoint and use it to check for work item failure.
Activity and app bundle quota violations are reported in endpoint failure responses after trying to submit or modify an app bundle or activity with parameters that violate a quota.
Setting Custom Quotas
The Design Automation API lets you set custom quotas that are lower than the service-enforced quotas described above. Custom quotas can help reduce cloud credit consumption.
POST servicelimits
Most custom quotas are set using the endpoint PUT servicelimits. These quotas control work item upload and download limits, upload and download size, processing time, payload size, and other work item limits. The quotas also control app and activity version and alias limits, payload size, and other limits. You can find these custom quotas described in detail in PUT servicelimits.
POST workitems
POST workitems also sets a custom quota through its limitProcessingTimeSec
attribute. A work item’s maximum duration of processing time is set by default to a value ranging from 100 to 10800 seconds (as shown in the work item quotas table above) depending on the engine used. limitProcessingTimeSec
can change that value for a single work item down or up to a maximum of 400 to 43200 seconds (also shown in the table above) depending on the engine used.
Limiting an app’s Monthly Consumption
APS by default does not limit the total time each month that an app takes to run Design Automation automations. If you want to set a monthly limit, use the PUT servicelimits endpoint to set the limitMonthlyProcessingTimeInHours
attribute in frontendLimits
. This limits the amount of Design Automation processing time that the app is allowed to consume each month. If the application reaches the consumption limit, the Design Automation service rejects subsequent work items for the remainder of the calendar month.