Help articles

Function timeout

Resolve timeout errors in Sanity Functions by adjusting the timeout duration.

When testing Sanity Functions locally, you may see a timeout error. For example:

By default, function execution time is set to 10 seconds, but may be configured down as low as 1 second and as high as 900 seconds (15 minutes).

You can experiment with different timeout values directly from the command line using the --timeout flag.

This increases the timeout value to 15 seconds.

Note: Your functions will likely run faster locally than in the cloud. Today's modern machines far outpace the capabilities of cloud runners. So expect to add a bit of padding in your timeout value to compensate.

Once you establish an appropriate timeout value, update your blueprint file.

Now the next time you test your function locally it will read the new timeout value from the blueprint.

Was this page helpful?