LoggerInitializationException - Akka logger timing out in Play application

595 views
Skip to first unread message

Suraj Mundada

unread,
May 13, 2016, 5:11:41 AM5/13/16
to Akka User List
Hi,

I am using Play 2.4.6 on CentOS 6 server with Java 8 for deploying production application. I am using Akka actors for doing my async tasks and sending email is one the tasks.

From last 2 days, I am getting following exception:

akka.ConfigurationException: Could not start logger due to [akka.ConfigurationException: Logger specified in config can't be loaded [akka.event.Logging$DefaultLogger] due to [akka.event.Logging$LoggerInitializationException: Logger log1-Logging$DefaultLogger did not respond with LoggerInitialized, sent instead [TIMEOUT]]] 
at akka.event.LoggingBus$class.startDefaultLoggers(Logging.scala:144) 
at akka.event.EventStream.startDefaultLoggers(EventStream.scala:26) 
at akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:623) 
at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:620) 
at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:617) 
at akka.actor.ActorSystemImpl._start(ActorSystem.scala:617) 
at akka.actor.ActorSystemImpl.start(ActorSystem.scala:634) 
at akka.actor.ActorSystem$.apply(ActorSystem.scala:142) 
at akka.actor.ActorSystem$.apply(ActorSystem.scala:109) 
at akka.actor.ActorSystem$.create(ActorSystem.scala:57) 
at akka.actor.ActorSystem.create(ActorSystem.scala) 
at manager.EmailManager.sendHtmlEmail(EmailManager.java:63) at

My application.conf has below entry:

akka {
        loggers = ["akka.event.slf4j.Slf4jLogger"]
        loglevel = "DEBUG"
        logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
        event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]
        default-dispatcher {
                fork-join-executor {
                        parallelism-min = 8
                                }
                }
}


logback.xml has following entries apart from other appender and logger declarations:

   <logger name="play" level="INFO" />
   <logger name="application" level="DEBUG" />
   <logger name="akka" level="INFO" />


However, I do not use akka logger reference defined above anywhere in my code. Instead, I use default logger configuration where timeout is happening:


 Logger.debug("EmailActor - onReceive() : MultiPartEmail message to x...@abc.com");


Each time timeout happens, I have to restart my play application.

Is it hardware issue which is restricting threads available for creating new actor instances? or something else? 

My production box is 1 Core 4 GB with CentOS 6 and play application runs within a docker on this box. 

Regards,
Suraj

Patrik Nordwall

unread,
May 13, 2016, 2:57:42 PM5/13/16
to Akka User List
You can try to increase the timeout. You find the property in reference.conf of akka-actor.

/Patrik
--
>>>>>>>>>> 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+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Suraj Mundada

unread,
May 30, 2016, 7:18:03 AM5/30/16
to Akka User List
I am still getting the timeout exception and every time I have to restart my prod server to fix the issue. 

I also tried following:

akka {

                loggers = ["akka.event.slf4j.Slf4jLogger"]

                loglevel = "DEBUG"

                logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"

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

                default-dispatcher {

                                fork-join-executor {

                                                parallelism-factor = 1.0

                                                parallelism-max = 24

                                                task-peeking-mode = LIFO

                                }

                }

}



But no success. 

Any pointers? 

Viktor Klang

unread,
May 30, 2016, 7:19:29 AM5/30/16
to Akka User List
You didn't change the timeout value.

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



--
Cheers,

Suraj Mundada

unread,
May 30, 2016, 8:27:16 AM5/30/16
to Akka User List
I am using Akka in Play 2.4.6 application and could not find reference.conf in my play application.

Also, there is no reference available in Play or Akka docs how I can add it in Play application.

Can you please share this info? 

Thanks,
Suraj

Akka Team

unread,
May 30, 2016, 8:41:35 AM5/30/16
to Akka User List
The reference.conf contains default configuration for Akka, it is nothing you need to add or change, it is shipped together with the classes in the akka-actor artifact. Your IDE should let you look at the contents of dependencies, it will be in the root directory of the akka-actor jar-file.

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



--
Akka Team
Typesafe - Reactive apps on the JVM
Blog: letitcrash.com
Twitter: @akkateam

Patrik Nordwall

unread,
May 30, 2016, 9:40:52 AM5/30/16
to akka...@googlegroups.com

Patrik Nordwall
Akka Tech Lead
Lightbend -  Reactive apps on the JVM
Twitter: @patriknw

Suraj Mundada

unread,
May 31, 2016, 1:13:41 PM5/31/16
to Akka User List
I looked at https://www.playframework.com/documentation/2.4.x/JavaAkka#Configuration 

It talks about only 2 parameters 

akka.actor.default-dispatcher.fork-join-executor.pool-size-max = 64
akka
.actor.debug.receive = on

I looked up these parameters on http://doc.akka.io/docs/akka/snapshot/general/configuration.html but could not find the parameters.

My current config is 

akka {
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "DEBUG"
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]
default-dispatcher {
fork-join-executor {
parallelism-factor = 1.0
parallelism-max = 24
task-peeking-mode = LIFO
}
}
}

I have only one processor in my server. So, I guess parallelism-factor = 1.0 is blocking creation of enough threads for actors. I will try parallelism-factor = 3.0 and watch it for some time if that helps.

Please let me know if I should try something else.

Regards,
Suraj






Reply all
Reply to author
Forward
0 new messages