Re: Thread Pooling when using SoapService & SoapClient
DotNetFan_at_Community.nospam
Date: 10/07/04
- Next message: Hervey Wilson [MSFT]: "Re: New User Encrypting Username Token Issue"
- Previous message: Gusti: "SecureConversation WS doesnt re-initiate SCT when WS is disposed"
- In reply to: Hervey Wilson [MSFT]: "Re: Thread Pooling when using SoapService & SoapClient"
- Next in thread: Hervey Wilson [MSFT]: "Re: Thread Pooling when using SoapService & SoapClient"
- Reply: Hervey Wilson [MSFT]: "Re: Thread Pooling when using SoapService & SoapClient"
- Reply: Hervey Wilson [MSFT]: "Re: Thread Pooling when using SoapService & SoapClient"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 7 Oct 2004 08:05:02 -0700
Harvey,
Did you identify source of thread creation & destruction? Have you already
fixed the problem?
Thanks
"Hervey Wilson [MSFT]" wrote:
> DotNetFan@Community.nospam wrote:
> > Harvey,
> >
> > Thanks for reply.
> >
> > Let me explain the problem in details.
> >
> > I am using the Serviceside object inherited from SoapService and client side
> > object inherited from SoapClient.
> >
> > You correctly identified that I am not creating any new threads. I am just
> > using WSE to invoke calls to Service every 5 seconds.
> >
> > You mentioned : "in general WSE doesn't create a new thread to handle either
> > clients or receivers, instead it uses threads from the threadpool to handle
> > events and process messages."
> >
> > We need make sure this statement is really true and that there is no bug in
> > case of soap.tcp. Unlike soap.http (which use infrastructure and settings of
> > IIS & ASP.Net enviornment), soap.tcp doesn't have such support from Forms
> > based projects. I am quite sure that these threads are created by WSE
> > classes. If I don't make any calls to Service, in timer_elasped handler, then
> > I don't see any exited threads in a VS window.
> >
> > This is not my real application, my real code is using Windows form on both
> > sides. This is a stripped down version to reproduce the problem. I get the
> > same behavior of creating and exiting from the new thread every 15 seconds,
> > even in Form based real application.
> >
> > I also disabled idleTimeout, sendTimeout,receiveTimeout,executionTimeout by
> > setting them to -1. But it didn't help.
> >
> > Could you reproduce the problem? Any further hints or directions?
> >
>
> There are no explicit thread creates anywhere in WSE2, although much use
> of made of the CLR threadpool for async results, wait callbacks and some
> timers. Given the resolution of 15 seconds, my suspicion is that this is
> coming from the message receive timeout engine which is not transport
> specific but bound to the SoapReceivers collection. The timeout engine
> uses a System.Threading.Timer at that 15 second resolution.
>
> The Framework documentation for this class indicates that it uses the
> threadpool, however that does not preclude the case that the threadpool
> is creating and destroying a thread to handle the timer callback.
> Clearly, if it's the timeout engine then the timer is being set
> unnecessarily in the case where timeouts are either disabled or no
> messages are being received.
>
> I'll investigate the initiation of the timer problem tomorrow and will
> also take a look at switching to a System.Timers.Timer to see if that
> alleviates the thread create / destroy. Any changes I make will appear
> in the SP2 build of the product.
>
>
> --
> This posting is provided "AS IS", with no warranties, and confers no rights.
>
- Next message: Hervey Wilson [MSFT]: "Re: New User Encrypting Username Token Issue"
- Previous message: Gusti: "SecureConversation WS doesnt re-initiate SCT when WS is disposed"
- In reply to: Hervey Wilson [MSFT]: "Re: Thread Pooling when using SoapService & SoapClient"
- Next in thread: Hervey Wilson [MSFT]: "Re: Thread Pooling when using SoapService & SoapClient"
- Reply: Hervey Wilson [MSFT]: "Re: Thread Pooling when using SoapService & SoapClient"
- Reply: Hervey Wilson [MSFT]: "Re: Thread Pooling when using SoapService & SoapClient"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|