Re: [akka-user] Akka 2.1.2 timeouts starting event handlers

336 views
Skip to first unread message

Roland Kuhn

unread,
Apr 24, 2013, 12:31:30 PM4/24/13
to akka...@googlegroups.com
Hi Alex,

have you tried switching on all debug logging as per http://akka.io/faq/ ? Could it be that your system sometimes becomes unresponsive for such long time, possibly due to a failing DNS lookup or a filesystem contention issue or similar? If it happens to all loggers and only sporadically then it must be something a little unusual. Or what does your JVM do during actor system start-up otherwise? How many actor systems do you start? (in parallel and/or per second?)

Regards,

Roland

23 apr 2013 kl. 21:11 skrev Alex Weil:

When I run my app using akka 2.1.2, it fails with the following exception:

Event Handler specified in config can't be loaded [com.despegar.hasp.impl.DummyLogEventHandler] due to [a06c8d75-0f07-40db-883a-16dc2914934bakka.event.Logging$LoggerInitializationException: Logger log1-DummyLogEventHandler did not respond with LoggerInitialized, sent instead [TIMEOUT]

DummyLogEventHandler is defined as:

class DummyLogEventHandler extends Actor {
   def receive = {
     case InitializeLogger(_) => sender ! LoggerInitialized
     case Error(cause, logSource, logClass, message) =>
     case Warning(logSource, logClass, message) =>
     case Info(logSource, logClass, message) =>
     case Debug(logSource, logClass, message) =>
   }

}

My configuration has the following lines:

event-handlers = ["my.app.DummyLogEventHandler"]
event-handler-startup-timeout = 15s

But I've also tried with the default logger:

event-handlers = []

and with slf4j (my app is using the logback backend and logging works ok):

event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]

Neither of those event-handlers nor incrementing the timeout to 60 seconds have worked so far. Moreover, the timeout is thrown sporadically. When I ran a test suite, the exception is thrown in different tests every time.

Can you help me find a solution?

Thanks,

 Alex.


--
>>>>>>>>>> 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 akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



Dr. Roland Kuhn
Akka Tech Lead
Typesafe – Empowering professional developers to build amazing apps.
twitter: @rolandkuhn

Roland Kuhn

unread,
Apr 25, 2013, 4:54:48 AM4/25/13
to akka...@googlegroups.com
Hi Alex,

you might want to check the documentation for BalancingDispatcher: 

  • All the actors share a single Mailbox that they get their messages from.

  • It is assumed that all actors using the same instance of this dispatcher can process all messages that have been sent to one of the actors; i.e. the actors belong to a pool of actors, and to the client there is no guarantee about which actor instance actually processes a given message.

  • Sharability: Actors of the same type only


This cannot work as the system’s default dispatcher, obviously. My guess is that your LoggerInitialized message is picked up by some other actor.

We will change the accessibility of the BalancingDispatcher in a future release because it is so special-purpose (see https://www.assembla.com/spaces/ddEDvgVAKr3QrUeJe5aVNr/tickets/2927).

Regards,

Roland

25 apr 2013 kl. 05:27 skrev Alex Weil:

Hi Roland,

If I comment out the dispatcher section in my configuration, the timeout exception is not thrown any more.
What's odd is that I only changed the dispatcher type to BalacingDispatcher and the default parallelism factor from 3 to 4:

  1. default-dispatcher {
  2. type = "BalancingDispatcher"
  3. executor = "fork-join-executor"
  4. fork-join-executor {
  5. parallelism-min = 8
  6. parallelism-factor = 3.0
  7. parallelism-max = 64
  8. }
  9. }

Thanks,
Alex.
Reply all
Reply to author
Forward
0 new messages