[Mono-dev] Self Hosted web service unstable – we see a new active port connection for each call

Atsushi Eno atsushieno at veritas-vos-liberabit.com
Mon May 10 00:58:04 EDT 2010


Hello,

I will first stabilize existing stuff as well as fill missing 
functionalities, and there is a lot to do. There isn't any kind of 
optimization. I'd rather welcome your contributions and won't work on it 
so far.

Atsushi Eno


On 2010/05/08 0:14, Vilius Adamkavicius wrote:
>
> We have implemented a simple self hosted web service in .NET using 
> ServiceHost. The Client is a simple Silverlight app that polls for 
> updated info every 5 seconds. The return messages tend to be no more 
> that 1-10K.
>
> We ported the web service (self-hosted) to MONO 2.6. This seemed to go 
> perfectly and it stood up to stress testing in devel...then we 
> deployed it. Now we find that the service is unstable and can just 
> hangs after anywhere between 2 minutes and 2 days.
>
> IP traces show that when it hangs the XML Post gets (request) gets 
> received by the webservice but nothing is ever transmitted back. Also 
> when it hangs netstat shows a persistent active connection on the port 
> to which it is allocated.
>
> In an attempt to diagnose this we looked at the port behaviour using 
> netstat. We looked at this while the MONO implementation of the 
> webservice was running without problem; we compare this to the active 
> port connection behaviour of the windows/.NET implementation- what 
> found was worrying.
>
> When we run a single client and connect the windows/.NET version of 
> the webservice we see *one port connection that persists*.
>
> When we run a single client and connect the MONO version of the 
> webservice we see it holds around *12-16 active port connections at 
> any one time*...and these seem to be continuously dying and regenerating.
>
> We postulated that each call to the webservice was making a new 
> connection (unlike Windows); each connection would be used once and 
> then timeout. Given the rate that the client polls we estimated that 
> the timeout must be around a minute...then we found this in the MONO 
> DefaultCommunicationTimeouts.cs
>
> Vilius: private DefaultCommunicationTimeouts ()
> {
> close = open = send = TimeSpan.FromMinutes (1);
> receive = TimeSpan.FromMinutes (10);
> }
>
> This strongly supports our theory...
>
> The question is why does it keep creating a new connection for each 
> call? Can the MONO 2.6 implementation of ServiceHost maintain a single 
> connection for an application session (like Windows .NET) ? What is 
> the ramification of this?
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>    



More information about the Mono-devel-list mailing list