Archived

This forum has been archived. Please start a new discussion on GitHub.

Thread Pool and Network Problems

Hi,

Is anyone aware of problems where a server thread can't complete because of some network problem between client and server? I would think that as soon as the write() of the return value completes to the socket, the thread should exit, regardless of the network state. We had a server apparantly run out of threads yesterday at the same time the network/client went screwy. Seems very strange.

As far as SERVER thread pool goes, the only thing I can think of that should hang up a thread is if the actual function call gets hung. Can anyone think of other reasons?

Thanks for any insights,

Comments

  • If sending data blocks due to network issues, then the threads in the server thread pool can hang, since these threads send the data before they are returned to the pool. The solution is to add a timeout to the Object Adapter's endpoints.
  • Network timeouts

    Thanks for the advice.
  • Specifying Timeout for Server Endpoint

    I understand that the timeout specified for the adapter will eliminate the blocking and fix my problem. The documentation (pg 1751 on 3.1.1 docs) says that the adapter timeout "Determines the default timeout that is advertised in proxies created by the object adapter." Does this mean that the timeout that is used on when the server attempts to write to clients is the same timeout used for client calls on proxies provided by the server?

    Thanks in advance,
  • Yes, this is correct. Note that you can override timeouts on both the client and the server side if you wish. See the Ice.Override.Timeout property for details.