Reputation: 413
I've got an internal service hosted over tcp. It's being self-hosted inside of a windows service. The service works fine for the most part, but once in awhile I'll get a bunch of exceptions (all in a row) from it.
System.ServiceModel.Security.SecuritySessionServerSettings.AddPendingSession(UniqueId sessionId, IServerReliableChannelBinder channelBinder)
throws a System.ServiceModel.QuotaExceededException
saying "Cannot create a security session. Retry later."
The service hovers around 14-30 requests per second and I don't see a spike in usage around the exception spike.
All of the services are simple data pulling/setting.
Is there something that could be wrong with my configuration or how the service is being called that can cause this?
Upvotes: 0
Views: 924
Reputation: 2047
A pending security session is a session established by a client without executing any operation. The number of such sessions is limited.
Usually, and especially given your low call rate, this is caused by clients not closing their sessions.
Upvotes: 0
Reputation: 74530
Have you tried to raise the maxReceivedMessageSize and the maxBuffersize in your config? Googling "QuotaExceededException wcf" leads to these three links, which seem to indicate that it helps:
http://guyellisrocks.com/coding/wcf-tracing-with-svctraceviewer/
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/d9d1ece9-250a-4cd3-99ab-123f4d2df762/
Upvotes: 2