John,
  Thank you very much for your response. My application is very simple. 
Just plain System.out right once matching the received Command.  I used the 
Reaper pattern to watch the created actor and tell the reapter to remove it 
from the list after finishing sending out all the messages the actor. After 
the list is empty, call system.terminate().
  The thing confused me is it is working well if the number of created 
actors is not that big.

  From the jconsole, I can see all the Actors has been killed, but there 
are lots of thread still alive.
  for example
    cluster9-nio-worker-1
    cluster9-connection-reaper-0
    cluster9-scheduled-task-worker-0
    ForkJoinPool-3-worker-15
   ...

Emily
 

On Monday, April 18, 2016 at 10:59:08 AM UTC-5, Johan Andrén wrote:
>
> Hi Emily,
>
> If an actor is blocking a thread and never returns it to the ActorSystem 
> cannot do much about it, and if you try to terminate the ActorSystem it 
> will never complete terminating. 
>
> Blocking a thread could be actual processing that never stops or just 
> takes a very long time, being stuck reading or writing some blocking 
> resource, etc. You should be able to see what is going on by connecting to 
> the JVM and taking a thread dump - this should show at least one thread 
> having a call stack into one of your actors.
>
> --
> John Andrén
> Akka Team, Lightbend Inc.
>
>
> On Monday, April 18, 2016 at 5:53:17 PM UTC+2, Yan Pei wrote:
>>
>> ActorSystem.terminate() works well with certain number of actors inside 
>> the system.
>>
>> Once I increase the actor number, the system().terminate() couldn't 
>> terminate the system, the application just hung on there and I have to 
>> manually kill it.
>> (running from Eclipse)
>>
>> From the log it's trying to:
>> [DEBUG] [04/18/2016 10:44:58.530] 
>> [ActorSystemmainaroraid1-akka.actor.default-di
>> spatcher-2] [EventStream] shutting down: StandardOutLogger started
>>
>> Anyone knows what's going on?
>>
>> Thanks very much!
>> Emily
>>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to