On Sun, Jan 12, 2014 at 9:08 AM, Erik Nelson <[email protected]> wrote:
> Thank you! > > I will say that, even though I understand why this is the case, it's a > bit strange in practice. Given the fact that multiple clients can connect > to the same server, the ability to terminate that way is, well... perhaps a > bit strange. > > I suspect it will not be an issue now that I have figured it out, but > this might be something that could use a brief call out in the > documentation - even just a single sentence indicating that stopping a > remote associated ActorRef will stop the associated actor as well. > ActorRef has the same semantics for local and remote actors: http://doc.akka.io/docs/akka/2.2.3/java/untyped-actors.html#Stopping_actors /Patrik > I know that would have saved me a pretty big chunk of time! > > erik > > On Jan 11, 2014, at 6:08 AM, Patrik Nordwall <[email protected]> > wrote: > > Hi Erik, > > There is no way to shutdown/close a remote connection. > When you say that you shutdown the ActorRef, I guess that you are using > system.stop(ref), which stops the actor. Thereafter you can't identify the > actor again, because the actor is terminated. > > At some point we might implement automatic disassociation of idle > connections. > > Regards, > Patrik > > > > On Sat, Jan 11, 2014 at 4:27 AM, Erik Nelson <[email protected]> wrote: > >> Hi gang, >> >> I've been playing with our remoting connection management library, and >> ran into a bit of a problem. I want to be able to disconnect and reconnect >> to a given server, but if I shutdown a local ActorRef that is associated >> with a remote actor, the remote becomes unable to accept new connections. I >> assume this is by design - the shutdown happens both locally and >> remotely(*). But I can't figure out how to just DISASSOCIATE the local >> actor ref, and I feel like if I don't then I'm going to have a memory leak >> over time. It's possible that this is only an issue in my test case, since >> in reality the case is that I only disconnect when the server goes down. >> >> But it Just Feels Wrong to not be able to shut down that remotely >> associated ActorRef! I can't find anything in the documentation, and the >> Disassociate class definitely doesn't seem to be something I should be >> using directly. >> >> This is with 2.2.3, and I'm using actor selection. >> >> (*) What I see actually happening in the debug logging is that when the >> server gets the Identify and tries to create its reciprocal connection to >> the client to respond, it gets a connection refused. And then goes ahead >> sending the Identify, but with a None as the ActorRef. The client has >> definitely reported listening on the port in question, so I feel like the >> connection refused is a red herring, and the reality is that it has no >> ActorRef to respond with because something internal has shut down. >> >> Thanks! >> >> erik >> >> >> -- >> >>>>>>>>>> Read the docs: http://akka.io/docs/ >> >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >> >>>>>>>>>> Search the archives: >> https://groups.google.com/group/akka-user >> --- >> You received this message because you are subscribed to the Google Groups >> "Akka User List" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > > Patrik Nordwall > Typesafe <http://typesafe.com/> - Reactive apps on the JVM > Twitter: @patriknw > > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: http://akka.io/faq/ > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: http://akka.io/faq/ > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/groups/opt_out. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/groups/opt_out.
