Help articles

Functions rate limit

Rate limiting helps prevent recursive functions from running indefinitely.

You may have received an error or notification regarding rate limits or concurrency when running your Functions.

If a function is invoked with the same document more than 200 times within 30s, we will not execute further function calls until the rate drops below this limit.

If functions from a single project are invoked more than 4000 times within 30s, we will not execute further function calls until the rate drops below this limit. This limit is to prevent a single project with many documents from all running at the same time and using up all of our concurrency.

To prevent these errors, use caution in situations where a function will cause a mutation that triggers itself.

If you're using the @sanity/client v7.12.0 or later, it will limit mutations from triggering a function chain recursively up to 16 times.

Was this page helpful?