Re: Configuring Remoting Socket
From: Philpot (Philpot_at_discussions.microsoft.com)
Date: 03/22/05
- Next message: Philpot: "Re: Configuring Remoting Socket"
- Previous message: Stan: "Re: Where is client-activated object created?"
- In reply to: Sunny: "Re: Configuring Remoting Socket"
- Next in thread: Philpot: "Re: Configuring Remoting Socket"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 22 Mar 2005 12:07:02 -0800
I had originally suspected the thread pool to be a possible problem here but
it turned out not to be the case.
It seems like the Thread pool does default to 25 threads per process per
CPU. But
the thread pool simply queues up requests when all threads are busy. This
queue seems to be reasonably big. Even if I tie up all 25 threads and queue
an additional 3000 methods to be run by the thread pool (on the server) I do
not get the same message when trying to make a remote call to the server.
Instead the call simply never returns nor does it get serviced.
I can simulate my problem by creating a socket based application and
specifying a small 'pending accept queue' size. The socket that is listening
for connections works by creating a new socket connection and adding it to
the 'pending accept queue' when a client attempts to connect. Another thread
then needs to call the listening sockets accept method to remove one of these
socket connections from the queue. If the thread calling accept can not keep
up with the sockets being added to the queue the queue fills up and the
socket that is listending for connections must 'refuse' any more client
connection requests.
"Sunny" wrote:
> In article <5CB6CE5A-ADEF-46FF-957E-3D6987F46C46@microsoft.com>,
> Philpot@discussions.microsoft.com says...
> > How can I configure the socket that is used by the remoting framework? I
> > wish to increase the size of the queue used to store pending socket
> > connections.
> >
> > Occassionally a large number of clients try to make a remote call to my
> > server and some are rejected because the pending accept queue gets full.
> >
> > On Win2000 the returned exception is similare to when the service is not
> > running (i.e. 'Actively refused').
> >
> > On WinXP the exception indicates that the server is busy and to try again
> > later.
> >
>
> Most probably this is not limitation of the socket, but a thread pool
> problem, as there is a limit of the thread pool size (30 threads per
> CPU). If you are not in Internet environment (I.e. proxies/firewalls are
> not an issue) you may try to spawn your own threads to deal with long
> duration requests, and callback the client when the result is ready.
> This will unload the thread pool.
>
> Or you can take a look at genuine channels, they use their own thread
> pool (and you can manage it). So far I haven't reached the point to
> exceed get "Actively refused" exception with them.
>
> Cheers
> Sunny
>
- Next message: Philpot: "Re: Configuring Remoting Socket"
- Previous message: Stan: "Re: Where is client-activated object created?"
- In reply to: Sunny: "Re: Configuring Remoting Socket"
- Next in thread: Philpot: "Re: Configuring Remoting Socket"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|