Debug EWS subscription error - You have exceeded the available subscriptions for your account

Recently i was investigating an issue reported by an app developer. They created a custom EWS (Exchange Web Services) application which tries to open streaming subscription to Exchange Server 2013 using EWS. It worked fine for a while and later they noticed the following error: You have exceeded the available subscriptions for your account. Remove unnecessary subscriptions and try your request again

During investigation we noticed that the error they get is due to exceeding the value for "EWSMaxSubscriptions" and it’s throttled.

You can refer more info about the related documentation which we published EWS Throttling in Exchange and Exchange Online Throttling and limits FAQ. By looking at the documentations, you will see EWSMaxSubscriptions defines the maximum number of active push, pull, and streaming notification subscriptions that a user can have on a specific Client Access server at one time. This is budgeted differently for different Exchange versions.

Once we increased the value of EWSMaxSubscriptions on the exchange server, it worked as expected.

Happy debugging!!