Home Help Center

Thread Pool and Network Problems

acbellacbell Member Andrew BellOrganization: Iowa State UniversityProject: National Resources Inventory ✭✭
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

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    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.
  • acbellacbell Member Andrew BellOrganization: Iowa State UniversityProject: National Resources Inventory ✭✭
    Network timeouts

    Thanks for the advice.
  • acbellacbell Member Andrew BellOrganization: Iowa State UniversityProject: National Resources Inventory ✭✭
    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,
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    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.
Sign In or Register to comment.