Home Help Center

Timeouts for well known proxies

ctennisctennis Member Caleb TennisOrganization: AEIProject: Project GINA ✭✭✭
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?

Thanks.

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Caleb,

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

    Thanks,
    Mark
  • ctennisctennis Member Caleb TennisOrganization: AEIProject: Project GINA ✭✭✭
    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 :)

    Thanks!
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    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 http://www.zeroc.com/doc/Ice-3.3.0/manual/Adv_server.29.12.html).

    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.
  • ctennisctennis Member Caleb TennisOrganization: AEIProject: Project GINA ✭✭✭
    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.
  • ctennisctennis Member Caleb TennisOrganization: AEIProject: Project GINA ✭✭✭
    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).
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    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.
Sign In or Register to comment.