[play-2.4.6] Could not start logger ... timeout during actor creation

546 views
Skip to first unread message

Suraj Mundada

unread,
Mar 16, 2016, 3:08:10 PM3/16/16
to play-framework
I am using Play 2.4.6 on CentOS 6 server with Java 8 for deploying production application.

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

I have used actors to send email to customers. Because of these exception, customers are not getting emails.

Can someone confirm root cause of issue and its solution?

The issue goes away for some hours after I restart my application server. It comes back again after few hours.

Regards,
Suraj

Suraj Mundada

unread,
Mar 17, 2016, 9:05:01 AM3/17/16
to play-framework
Hi,

Any clue on this? I have tried out putting logger-startup-timeout = 30s in application.conf 

Till now, I have not the exception again. However, I am not sure this is the right solution.

Can anyone please confirm?

Regards,
Suraj

Manuel Bernhardt

unread,
Mar 17, 2016, 11:30:19 AM3/17/16
to play-fr...@googlegroups.com
What is your logger setup? I.e. how does your akka configuration in application.conf look like, how does your logger.xml look like, and what logging libraries do you load in SBT?

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/86a9cd9f-7ef3-4eaa-a37f-fbdf4189ca6c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Suraj Mundada

unread,
Mar 18, 2016, 5:31:41 AM3/18/16
to play-fr...@googlegroups.com
Log configuration in application.conf:

logger.com.jolbox=DEBUG
# Logger
# ~~~~~
# You can also configure logback (http://logback.qos.ch/),
# by providing an application-logger.xml file in the conf directory.

# Root logger:
#logger.root=ERROR

# Logger used by the framework:

# Logger provided to your application:
#logger.application=DEBUG


application-logger.xml is attached.

I do not load any specific log library in sbt as I am using Play logger.

--
You received this message because you are subscribed to a topic in the Google Groups "play-framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/play-framework/v6v44rGxcdk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/CAN8MJYh6r-04JgpmqEQdrkN-i7-YJ7ffnW%3Dj%2B%2Bhf4%3DOCw_UtwQ%40mail.gmail.com.
application-logger.xml

Manuel Bernhardt

unread,
Mar 18, 2016, 6:50:51 AM3/18/16
to play-fr...@googlegroups.com
It seems like you have no akka logging configuration in there. This is different from the Play logging config.

You'll likely need the akka slf4j appender in build.sbt

 "com.typesafe.akka" %% "akka-actor" % "2.4.1",
 "com.typesafe.akka" %% "akka-slf4j" % "2.4.1"


(make sure to use the correct version of Akka for this Play version)


HTH,

Manuel

Suraj Mundada

unread,
Mar 30, 2016, 2:19:39 AM3/30/16
to play-framework
Hi Manuel,

Thanks a lot. This worked. 

Thanks,
Suraj

Suraj Mundada

unread,
May 10, 2016, 10:35:04 AM5/10/16
to play-framework
I am facing this issue again after a short breather. Tried few tweaks after googling on different forums and blogs. But akka logger timeout occurs again after 36 or 48 hrs of restarting my play application.

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





Suraj Mundada

unread,
May 11, 2016, 6:05:13 AM5/11/16
to play-framework
Any idea? 

I am troubleshooting this issue from last 3-4 days without any success. Any pointers will be appreciated.
Reply all
Reply to author
Forward
0 new messages