Is there a setting to adjust the down timer for an ActorSystem after terminate?

This log entry happens after I call terminate() on the actor system.

akka.remote.Remoting akka.remote.Remoting Remote system with address [akka.tcp://actorSystemTest@127.0.0.1:10001] has shut down. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters.

I’d like to shorten this time. I tried changing in application.conf:

retry-gate-closed-for = 1 s

but I still see the same 5000 ms noticed in the logs.

It should be

akka.remote.retry-gate-closed-for = 1 s

Thanks for the answer. I should have posted my full application.conf. It is:

akka {
  actor {
    provider = remote
  }
  remote {
    enabled-transports = ["akka.remote.netty.tcp"]
    retry-gate-closed-for = 1 s
    netty.tcp {
       hostname = "127.0.0.1"
       port = 10001
    }
  }
}

But I still see:
akka.remote.Remoting akka.remote.Remoting Remote system with address [akka.tcp://actorSystemTest@127.0.0.1:10001] has shut down. Address is now gated for 5000 ms
in the logs after the terminate. I think your formulation is the same, right?

Yes, that should be the same. Strange that it’s not picking up your configuration change. Try with

akka.log-config-on-start = on

to verify that it’s actually running with your config.

Thanks from that debugging tip. So, I see this in my log output:

...
            # all watched actors at the same time.
            "resend-limit" : 200,
            # String: 8
            "retry-gate-closed-for" : "1 s",
            # reference.conf @ jar:file:/Users/btofel/.m2/repository/com/typesafe/akka/akka-remote_2.11/2.5.1/akka-remote_2.11-2.5.1.jar!/reference.conf: 317
            # Deprecated since 2.4-M1
            "secure-cookie" : "",
...

Is that String: 8 an indicator it’s not really being taken up as part of the config? Like it’s an unrecognized 8 characters of String?

That looks good. Then that 1 s is picked up. The String : 8 probably just means that it was loaded via a ConfigFactor.parseString instead of the reference.conf.

Just to make sure, you set this in both actor systems involved in this test right?
ActorSystem B is terminating, but the gating is done in ActorSystem A, so the config that is relevant is for ActorSystem A (but all should have the same config).

Ah so, no, I had a different config via application.conf that didn’t mention retry-gate-closed-for. I added the 1 s setting there and it changed the behavior for both actor systems. Should it be possible to have a different config for one of the actor systems? It would be preferable, since this actor system is being created just for test and was hoping to not change the production settings.

You can pass in a confit object when you construct an ActorSystem yeah. See also ‘ConfigFactory’ to parse settings strings etc

Yep I config’ed the test actor system with a string parsed by ConfigFactory, but I think I was just missing the need to override the default actor system’s timing too and I am all set now. Thanks to you both!