Home Help Center

Glacier/GlacierStarter closing connections?

vukicevicvukicevic Member Vladimir VukicevicOrganization: DUGProject: DUG Insight ✭✭
With the Glacier "session" demo, I'm seeing the following behaviour... I fire up the server, then I run glacierstarter, and then I run the client. If I just let this sit for a little while (haven't timed how long -- maybe 60 seconds? maybe slightly longer?), I get:

glacierstarter:
[ ../../../bin/glacierstarter: Network: stopping to accept tcp connections at 127.0.0.1:53521 ]
[ ../../../bin/glacierstarter: Network: stopping to accept tcp connections at 127.0.0.1:53518 ]
[ ../../../bin/glacierstarter: Network: closing udp connection
  local address = 127.0.0.1:33382
  remote address = <not connected> ]
[ ../../../bin/glacierstarter: Network: stopping to accept ssl connections at 127.0.0.1:53519 ]
[ ../../../bin/glacierstarter: Network: closing tcp connection
  local address = 127.0.0.1:53521
  remote address = 127.0.0.1:53522 ]
[ ../../../bin/glacierstarter: Network: closing tcp connection
  local address = 127.0.0.1:53518
  remote address = 127.0.0.1:53523 ]
[ ../../../bin/glacierstarter: Network: closing tcp connection
  local address = 127.0.0.1:53520
  remote address = 127.0.0.1:10000 ]

client:
==> [ ./client: Network: closing tcp connection
  local address = 127.0.0.1:53522
  remote address = 127.0.0.1:53521 ]
[ ./client: Network: closing tcp connection
  local address = 127.0.0.1:53523
  remote address = 127.0.0.1:53518 ]

This is consistent with similar behavior I'm seeing in my own app, where glacierstarter seems to close connections after some period of inactivity. As best I can tell, Active Connection Management is off -- should be off by default, and I also attempted setting Ice.ConnectionIdleTime=0 in the config file, with no difference.

I might not be clear on the life cycle of servants wrt Glacier -- I thought the glacier connections would be closed only when the servants/adapters that are using it were shut down on the client end?

Comments

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

    What you're seeing is caused by the following property in the configuration file:
    Glacier.Starter.PropertiesOverride=Ice.ServerIdleTime=60
    
    Briefly, the PropertiesOverride property defines settings that the starter process passes to its router child process. In this example, the Ice.ServerIdleTime property causes the router child process to terminate after 60 seconds of client inactivity. The starter detects the death of the router and subsequently destroys the object adapter it created to service the client, and also closes its connection to the server. The trace messages you're seeing reflect this cleanup activity.

    Change the property above to 0 so that the router will not terminate automatically, or increase it to a more suitable value.

    Take care,
    - Mark
  • vukicevicvukicevic Member Vladimir VukicevicOrganization: DUGProject: DUG Insight ✭✭
    Oops.

    I seem to have been blind, thank you :)
Sign In or Register to comment.