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

Timeouts for well known proxies

I have some proxies that are "well known" in our network.

The problem is, at the applicaiton level, the ice timeout mechanism doesn't seem to work on these proxies. That is, there's no way I can specify how long a call should take to return before timing out. The proxy endpoint doesn't allow a "-t 5000" to be set in it either.

I think I could change the endpoints at the IceGrid level, but I'm hoping to avoid doing that. As well, we may want different applications to have iffernt timeout values.

What are my options?



  • mes
    mes California
    Hi Caleb,

    Could you be more specific about what you've tried and what is not working?

  • Certainly.

    Let's say I have a IceGrid setup with everything kind of happening all behind the scenes.

    I have a well known object called "MotorControl". In my end application I just do something like this:

    mc = MotorControlPrx::checkedCast( communicator->stringToProxy("MotorControl") )

    and use mc just fine, with IceGrid doing the locator magic behind the scenes.

    But now let's say I want to put a timeout on the proxy I created.

    mc = mc->ice_timeout(5000)

    That doesn't do anything. The stringified proxy is still "MotorControl -t" (-t being for tcp). I can't change the timeout becuase it's in the endpoints and there aren't any endpoints for a well known proxy, it seems.

    Now, in my server where MotorControl resides, I could add a timeout to that endpoint such that it was inherent, but then it's the same timeout no matter what application in my network holds the proxy. And maybe I want differing applications to be able to have differing timeouts.

    None of this is critical, I'm just trying to understand if there's no way to change timeouts on well known proxies. If not, should there be? If there is, then I want to learn how :)

  • matthew
    matthew NL, Canada
    The timeout set by calling ice_timeout is a local proxy setting, and will not appear in the stringified proxy (see my article in issue 23 of connections, or the Ice manual here

    Calling methods on the mc proxy should result in a timeout exception, if no response arrives in 5 seconds, assuming no retries. If retries are involved the timeout will take longer.
  • Thanks Matthew

    We're not seeing that behavior, but let me dig deeper to make sure it's not some other issue. We're seeing blocking of indefinite amounts of time even if we set the ice_timeout.
  • Maybe the testing was a little skewed too - we set the timeout to a very low value (like 100) and tried it, and noted that it didn't time out, even though the completion of the remote event takes longer (on the order of 2-3 seconds).
  • matthew
    matthew NL, Canada
    If you have lots of endpoints in the proxy, and retries enabled then a timeout can take a lot longer than the timeout set. If you turn on more tracing (Ice.Trace.Network and Ice.Trace.Retry) you can get a better idea of what actually occurs.