views:

285

answers:

2

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?

+2  A: 

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://www.arquitecturadesoftware.org/blogs/hugobatista/archive/2006/05/16/wcf-maxreceivedmessagesize-and-quotaexceededexception.aspx

http://guyellisrocks.com/coding/wcf-tracing-with-svctraceviewer/

http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/d9d1ece9-250a-4cd3-99ab-123f4d2df762/

casperOne
A: 

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.

Alex