Nylas Docs

The Nylas Developer Hub

Welcome to the Nylas developer hub. You'll find comprehensive guides and documentation to help you start working with Nylas as quickly as possible, as well as support if you get stuck. Let's jump right in!

Developer Guide

Throttling Policies

There are a couple scenarios where you might see an error in the Nylas dashboard, or a response from our API, that says an Exchange account has been throttled.

Throttling policies can vary significantly from Exchange server to Exchange server, so it all depends on the configuration of the server.

If a user is trying to send mail and the API returns a 429, this can indicate multiple issues. The first would be that the user is running into a sending limit and is being throttled since they have sent too much mail. In the case that you see provider send throttling with a 429 status code, you should retry the send with exponential backoff. Some Exchange servers have throttling policies which limit us to a certain number of requests per block of 20 minutes. Sometimes you'll see a send succeed if you retry them 2 minutes later. Multiply the backoff time by some constant (like 2) after each attempt, and attempt up to some MAX amount of times.

Regarding how to raise the limit: You should contact your Exchange system administrator to discuss the specific throttling policy that is in place and how to change it.

In another scenario, you can receive a 429 during sending even if the user has sent way less mail than their sending limits for the day. Clearly, it doesn't make any sense that you would receive a sending rate limit since the user is under the sending limit.

The reason this could happen is that while we constantly sync an account throughout the day, sometimes Exchange servers will throttle the account - independent of sending - to decrease load on the server. The Exchange server will send us a header with information about how long we should wait until we try to sync again. If we're in one of these "throttling" periods and you attempt to send mail - then you'll also receive a 429.

Sometimes throttling will take place and return an ‘Error 503’ Throttle Header, 'X-MS-ASThrottle: CommandFrequency'. This means that there were “too many commands”, and it applies to “how quickly the device is hitting the server in general (across all commands)”.

The default value for CommandFrequency is to block after “400 commands in 10 minutes”, and block for “20 minutes”. We recommend for managed exchanged account that the email administrator increase the threshold for CommandFrequency on the account if this error is triggered. However, you may have some other value configured by the administrator and/or you could be encountering throttling for some other underlying performance reasons which require troubleshooting.

Updated about a month ago

Throttling Policies

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.