Last Update: February 4th, 2016
When deploying Exchange 2013 or Exchange 2016 in co-existence with a legacy version of Exchange, there comes a point where all traffic is routed through Exchange 2013/2016. Traffic for mailboxes hosted on legacy Exchange versions will be proxied by Exchange 2013/2016 to the back end.
This proxy process has some built-in limits for certain protocols, which you could encounter. Symptoms of these limits are Event 2022’s being logged in the Application log by the MSExchange Front End HTTP Proxy service:
Per Exchange 2013 CU7, this message should be considered a notice, despite the confusing event description. No connections are being blocked. However, the events create noise in your logs, which can be prevented by raising these limits. To accomplish this, you need to dive in to the web.config of the applicable HTTP Proxy protocols:
- $ExInstall\FrontEnd\HttpProxy\sync\web.config (for ActiveSync, EAS)
- $ExInstall\FrontEnd\HttpProxy\rpc\web.config (for OA, RPC/http)
In those files, create or adjust the entry in the <appsettings> configuration node, where <value> is the limit you want to configure (default is 150):
<add key=”HttpProxy.ConcurrencyGuards.TargetBackendLimit” value=”<value>” />
After adjusting these values, recycle the relevant application pools, e.g. MSExchangeSyncAppPool and MSExchangeRPCProxyAppPool.
The above steps need to be performed on all Exchange 2013/2016 Client Access Servers.
To automate this process of tedious editing in web.config files, I have created a small script which lets you alter these values for EAS and RPC against the local server or remotely. The script, Configure-HTTPProxyTargetBackEnd.ps1, has the following parameters:
- Server to specify server to configure. When omitted, will configure local server.
- AllServers to process all discoverable Exchange Client Access servers
- TargetBackEnd specifies Target Backend limit (default 150).
- NoRecycle to prevent recycling the MSExchangeSyncAppPool and MSExchangeRPCProxyAppPool
For example, to configure the local server with a limit of 2000 for Exchange Active-Sync and RPC access, use:
.\Configure-HTTPProxyTargetBackEnd.ps1 -TargetBackEnd 2000
Note that the script will create a backup copy of the web.config files before editing, using the current timestamp.
You can download the script from the TechNet Gallery here.
Feedback is welcomed through the comments. If you got scripting suggestions or questions, do not hesitate using the contact form.
See TechNet Gallery page.