Print Page | Close Window

Notification Service subscription timeout exception

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3237
Printed Date: 13-May-2026 at 12:21pm


Topic: Notification Service subscription timeout exception
Posted By: JamesM
Subject: Notification Service subscription timeout exception
Date Posted: 27-Jan-2012 at 8:34am
We are getting error messages while attempting to subscribe to our BOS's notification service.

In our BOS log on the webserver we are getting this message:

IdeaBlade.EntityModel.Server NotificationServiceManager::AsyncNotify
Removing subscriber after error The message could not be transferred within the allotted timeout of 00:01:00. There was no space available in the reliable channel's transfer window. The time allotted to this operation may have been a portion of a longer timeout.

On the client we are capturing two different exceptions:

IdeaBlade.EntityModel.EntityServerException: The message could not be transferred within the allotted timeout of 00:01:00. There was no space available in the reliable channel's transfer window. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The message could not be transferred within the allotted timeout of 00:01:00. There was no space available in the reliable channel's transfer window. The time allotted to this operation may have been a portion of a longer timeout.

Server stack trace: 
   at System.ServiceModel.Channels.TransmissionStrategy.WaitQueueAdder.Wait(TimeSpan timeout)
   at System.ServiceModel.Channels.TransmissionStrategy.InternalAdd(Message message, Boolean isLast, TimeSpan timeout, Object state, MessageAttemptInfo& attemptInfo)
   at System.ServiceModel.Channels.ReliableOutputConnection.InternalAddMessage(Message message, TimeSpan timeout, Object state, Boolean isLast)
   at System.ServiceModel.Channels.ReliableDuplexSessionChannel.OnSend(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.DuplexChannel.Send(Message message, TimeSpan timeout)
   at System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at IdeaBlade.EntityModel.EntityServerProxy.RegisterCallback(SessionBundle sessionBundle, SubscribeWorkState workstate)
   at IdeaBlade.EntityModel.EntityManager.<RegisterCallbackAsyncCore>b__68(RegisterCallbackOperation op)
   --- End of inner exception stack trace ---
   at IdeaBlade.EntityModel.AsyncProcessor`1.<>c__DisplayClass2.<.ctor>b__0(TArgs args)
   at IdeaBlade.EntityModel.AsyncProcessor`1.Signal()
   at IdeaBlade.EntityModel.AsyncProcessor`1.<Execute>b__5(Object x)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

And the other:

IdeaBlade.EntityModel.EntityServerException: Unable to subscribe to service.  Make sure the EntityServer is listening for INotificationService operations. ---> IdeaBlade.Core.IdeaBladeException: Unable to subscribe to service.  Make sure the EntityServer is listening for INotificationService operations. ---> System.ServiceModel.CommunicationException: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at IdeaBlade.EntityModel.INotificationService.Subscribe(SessionBundle sessionBundle, SubscribeWorkState workstate)
   at IdeaBlade.EntityModel.NotificationCallbackManagerBase.Subscribe(SessionBundle sessionBundle, SubscribeWorkState workstate)
   --- End of inner exception stack trace ---
   at IdeaBlade.EntityModel.RemoteEntityServerProxyBase.CheckConnection(Exception pException)
   at IdeaBlade.EntityModel.EntityServerProxy.RegisterCallback(SessionBundle sessionBundle, SubscribeWorkState workstate)
   at IdeaBlade.EntityModel.EntityManager.<RegisterCallbackAsyncCore>b__68(RegisterCallbackOperation op)
   --- End of inner exception stack trace ---
   at IdeaBlade.EntityModel.AsyncProcessor`1.<>c__DisplayClass2.<.ctor>b__0(TArgs args)
   at IdeaBlade.EntityModel.AsyncProcessor`1.Signal()
   at IdeaBlade.EntityModel.AsyncProcessor`1.<Execute>b__5(Object x)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Our Server Side configuration is as folllows:

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core"/>
  </configSections> 
  <connectionStrings>
	[Redacted]
 </connectionStrings>  
  <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig" > 
    <logging logFile="log\DebugLog.xml"
              archiveLogs="true"/>
    <notificationService enabled="true"/>    
  </ideablade.configuration> 
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="false"
                               multipleSiteBindingsEnabled="true" />
    <services>
      <service name="EntityService">
        <endpoint address=""
                  binding="customBinding" bindingConfiguration="compressedBinaryBinding"
                  contract="IdeaBlade.EntityModel.IEntityServiceContract" />
      </service> 
      <service name="IdeaBlade.EntityModel.Server.EntityServer">
        <endpoint address=""
                  binding="customBinding" bindingConfiguration="compressedBinaryBinding"
                  contract="IdeaBlade.EntityModel.IEntityServerContract" />
        <endpoint address="NotificationService"
                  binding="wsDualHttpBinding" bindingConfiguration="dualBinding"
                  contract="IdeaBlade.EntityModel.INotificationService" /> 
      </service>
    </services>
    <bindings> 
      <customBinding>
        <binding name="compressedBinaryBinding" sendTimeout="00:05:00" receiveTimeout="00:05:00">
          <gzipMessageEncoding>
            <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" />
          </gzipMessageEncoding>
          <httpTransport maxReceivedMessageSize="2147483647" />
        </binding>
 
      </customBinding>
      <wsDualHttpBinding>
        <binding name="dualBinding" messageEncoding="Mtom"  maxReceivedMessageSize="2147483647"  >
          <security mode="None"  />
        </binding>
      </wsDualHttpBinding> 
    </bindings> 
    <extensions>
      <bindingElementExtensions>
        <add name="gzipMessageEncoding" type="IdeaBlade.Core.Wcf.Extensions.GZipMessageEncodingElement, IdeaBlade.Core"/>
      </bindingElementExtensions> 
    </extensions>
  </system.serviceModel> 
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web> 
  <appSettings>
    <add key="NotificationPollTimeSpan" value="00:00:05"/>
  </appSettings> 
</configuration>
And our client side config is:

<ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig"> 
    <logging logFile="DebugLog.xml"/>
    <objectServer
      remoteBaseURL="[Redacted]"
      serverPort="80"
      serviceName="[Redacted]\EntityService.svc"
      >
      <clientSettings isDistributed="true" />
    </objectServer> 
    <notificationService clientPort="39199"/>
  </ideablade.configuration>
These errors don't happen all the time, a user may happily use the application with no problems but then later they start to occur and they are instance unspecific.



Replies:
Posted By: DenisK
Date Posted: 27-Jan-2012 at 12:38pm
Hi JamesM,

There were a couple of posts a while ago from customers that had these similar if not the same errors. Please refer to the link below.

http://www.ideablade.com/forum/forum_posts.asp?TID=2764&title=push-config - http://www.ideablade.com/forum/forum_posts.asp?TID=2764&title=push-config

Please let me know if this solves your problem.


Posted By: JamesM
Date Posted: 27-Jan-2012 at 12:56pm
Thanks for your response DenisK.

However I neglected to mention in my above post that our client is a WPF application 

The conclusion reached from the link you send me has do with using a "pollingDuplex" binding which appears to be for silverlight according to the documentation on " http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-push-notification - http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-push-notification "The subsequent link from that post got to a discussion that involves IE8.


Posted By: DenisK
Date Posted: 27-Jan-2012 at 4:40pm
I see. In that case, the only other thing I could think of is to try changing the timeouts to a value higher than 00:01:00. For example,

<wsDualHttpBinding>
        <closeTimeout="00:10:00"
        openTimeout="00:10:00" 
        receiveTimeout="00:10:00"
        sendTimeout="00:10:00"


You might need to have this set on both the client and server, which means you need to include the serviceModel section onthe client as well. Please let us know whether this works or not.


Posted By: JamesM
Date Posted: 27-Jan-2012 at 5:01pm
While waiting for a response we had taken a closer look at http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-push-notification - http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-push-notification  and determined that our wsDualHttpBinding on our BOS didn't follow the same pattern so we made our binding look like this.

<wsDualHttpBinding>
        <binding name="dualBinding" messageEncoding="Mtom"
                 receiveTimeout="00:10:00"
                 maxReceivedMessageSize="2147483647"
                 maxBufferPoolSize="2147483647">
          <reliableSession inactivityTimeout="01:00:00" />
          <security mode="None"  />
        </binding>
</wsDualHttpBinding>
Which appears to be close to what you are suggesting, but the change didn't work as well.

We are only experiencing these errors in a staging environment that is designed to mimic our production environment. 
This solution appears to be working in development and an intermediary snapshot environment.


Posted By: DenisK
Date Posted: 27-Jan-2012 at 5:10pm
Just want to quickly check that you also made the timeout change on the client side config?


Posted By: JamesM
Date Posted: 30-Jan-2012 at 8:47am
We did not make the change to the client-side endpoint.

We just turned on the notification without making a explicit configuration of the the endpoint on the client.

Would you be able to provide an example client-side endpoint config for just the notification service?


Posted By: DenisK
Date Posted: 30-Jan-2012 at 12:02pm
Sure. Here you go.  uploads/912/Client_app.config.default.txt - uploads/912/Client_app.config.default.txt


Posted By: JamesM
Date Posted: 31-Jan-2012 at 6:22am
Thanks for the example.

We identified the issues we were having in certain environments. Our network infrastructure team here installed a faulty configuration setting patch onto a network load balancer. Causing the notification service to behave erratically while communicating with our client, the entity service appears to have been unaffected.

We will implement the change to the client's configuration.

Thank you for your help,

J


Posted By: DenisK
Date Posted: 31-Jan-2012 at 1:58pm
Thanks for the update James.



Print Page | Close Window