Exchange API-spottingThom Randolph
We are specifically focused on throttling of Exchange Web Services (EWS) and MAPI with RPC over HTTP (as used by Microsoft Outlook) and with hard limits set by the Exchange Online system. Any mention of specific setting values were obtained for the service version 14.0.100.0. You will want to have your tenant admin obtain and confirm setting values.
Note An on-premise Microsoft Exchange deployment may have a different throttling policy. Administrators can modify throttling settings for Microsoft Exchange on-premises. Administrators cannot configure throttling policies for Exchange Online.
What is the impact of exceeding throttling budgets?
Exchange throttling is based on the amount of Active Directory, Exchange store, and other resources a client consumes. A budget is allocated to each client to limit the resources a particular user consumes. This budget is recharged every minute.
EWS clients can exceed their budgets by sending too many concurrent requests, or by requesting too many resources on the server. When this occurs, additional requests are queued until one of two things happen:
When MAPI clients exceed their budgets, additional requests are returned with an error, until the application is under budget. There is no queuing of requests.
How do I get throttling settings?
Tenant administrators can view throttling settings by using Remote PowerShell and the Get-ThrottlingPolicy cmdlet. For information about how to connect Remote PowerShell for your tenant, see Install and Configure Windows PowerShell and Connect Windows PowerShell to the Service on Microsoft TechNet.
Use the Get-ThrottlingPolicy cmdlet (without arguments) to get all the throttling policy settings. Throttling policies might change to enhance service performance, so you should confirm throttling policies. We suggest that you make your client applications configurable to adjust for potential changes in throttling policy for Exchange Online. Additionally, because Exchange Online and Exchange on-premises might have different throttling policies, you may want to account for this when you design your client applications.
What are the common throttling settings?
The following throttling settings are common to both EWS and MAPI (RPC over HTTP) clients:
What are the MAPI with RPC over HTTP throttling settings?
The prefix RCA in the MAPI RPC/HTTP settings represents RPC Client Access. The following throttling settings are specific to MAPI RPC over HTTP:
What are the Exchange Web Services throttling settings?
The following throttling settings are specific to Exchange Web Services:
For more information about EWS throttling policy, see EWS Best Practices: Understanding Throttling Policies.
What are the specific Exchange Web Services limits?
The following are the specific EWS throttling limits:
Note The values for this limit differ for an on-premise Exchange 2010 deployment. In the initial release version of Exchange 2010, the message size limit is 10 MB. In Exchange 2010 Service Pack 1 (SP1), the message size limit is 35 MB.
Administrators cannot configure throttling policies for Exchange Online.
On one hand this makes total sense to not allow customers change the throttling settings in Exchange Online so that MS could have predictable load levels.
On the other hand higher bandwidth may be required for migration purposes, which is a one-time project. I expect corresponding settngs may be changed by MS for a customer upon request, but this would require contacting support.
I have an enhancement proposal: allow customer to change specific throttling settings for just one specific account. Use case: I want to run a migration and use third-party (not native migration-batch) tools for that. Those tools use an ms online administrator account to connect to Exchange Online. If there was a powershell cmdlet allowing to set higher throttling settings for this specific account, that would be great. Of course, throttling setting limits need to be defined for this account as well, but they can be considerably higher than the ones for generic users just using services.
This would allow to:
1. Still have predictable load levels.
2. Eliminate the need for contacting support to do migration.
The Get-ThrottlingPolicy commandlet is not available on office 365 online
The Get-ThrottlingPolicy commandlet is not available on office 365 online. So the statement "Use the Get-ThrottlingPolicy cmdlet (without arguments) to get all the throttling policy settings" will not work for Office 365 domains. It is a pity that MS has not specified this anywhere and people spent hours setting up the environments just to figure out this doesn't work.
I lost the time, don't want any one else to lose it again.
i am sending the message with attachments of greater then 10 MB using MAPI 2.0 throws exception:
Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The underlying connection was closed: An unexpected error occurred on a send. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.MultipleSend(BufferOffsetSize[] buffers, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers)
--- End of inner exception stack trace ---
at System.Net.Security._SslStream.StartWriting(SplitWritesState splitWrite, SplitWriteAsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.ProcessWrite(BufferOffsetSize[] buffers, SplitWriteAsyncProtocolRequest asyncRequest)
at System.Net.TlsStream.MultipleWrite(BufferOffsetSize[] buffers)
at System.Net.Connection.Write(ScatterGatherBuffers writeBuffer)
at System.Net.ConnectStream.ResubmitWrite(ConnectStream oldStream, Boolean suppressWrite)
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute()
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalCreateItems(IEnumerable`1 items, FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode, ServiceErrorHandling errorHandling)
at Microsoft.Exchange.WebServices.Data.ExchangeService.CreateItem(Item item, FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode)
at Microsoft.Exchange.WebServices.Data.Item.InternalCreate(FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode)
at Microsoft.Exchange.WebServices.Data.Item.Save(WellKnownFolderName parentFolderName)
at
@Shafdat_ali,
I suggest you post your question with additional information to the Exchange development forum. I'd expect you will get answer sooner that way.
social.technet.microsoft.com/.../threads
With regards,
Michael Mainer
Microsoft Corporation
@Regarding throttling policy cmdlets and Exchange Online.
Yes, it is true that the throttling policy cmdlets were removed from Exchange Online. I've raised this as a concern with the product team.
This was a very informative post with exactly the answer I was looking for. Unforunately we are using Exchange Online which limits what I can do but information is power. Thank you very much for this.
Kris
Michael, I heard Office 365 Wave 15 throttling has gotten more severe. For example, powershell sessions limit on per tenant basis was introduced. When could we expect an update to this article to reflect Wave 15 changes? Thanks!
Michael,
I want to move my office to cloud-based Amicus Cloud which works great with Outlook 2010. I currently have Microsoft 365 which I would also keep. However, I've gotten feedback from several law firms that say it literally takes "minutes" for an appointment to post sometimes using Amicus with Office 365 due to this throttling issue. Any updates on this?
@Jay Foster
Creating an appointment would not come close to reaching a throttling limit. I'd have to know what their cloud service does before I could comment on it.