Hi Ronald, Thanks for your answer. I will definitely explore the approach you have suggested. In the meantime, as a workaround solution, we have reduced amount of logging in the code and used standalone org.slf4j.logger instead of akka.event.logger. That reduced the amount of heap memory growth drastically. But I have few doubts/question
1. Our application has a very aggressive roadmap this year and as the application grows, how org.slf4j.logger perform in a highly concurrent environment? I was assuming that akka logger has been built to handle such scenarios, so using a stand alone logger will do better? 2. I am curious to understand what exactly you meant by overloading the logger application. Is it because to many request coming to the logger mailbox? How using a bounded mailbox(LinkedBlockingQueue) help here, wont that cause the threads to wait, causing degradation? To give an overview of amount of login that caused the issue, our application has pick load of 100 req/min continuously for 3 hours. Average each req creates 50 log entries. So roughly there is 500000 entries in 3 hours. This is in a production application server Thanks On Mon, Jul 27, 2015 at 7:16 PM, Roland Kuhn <[email protected]> wrote: > As Johannes says you are most likely overloading the logging system. > Unfortunately the default event handlers do not offer protection against > this but you can easily write your own (start by copying this one > <https://github.com/akka/akka/blob/v2.4-M2/akka-slf4j/src/main/scala/akka/event/slf4j/Slf4jLogger.scala#L58>) > to use a bounded Mailbox or a bounded internal queue before dispatching to > the actual Logger (in a non-blocking fashion or in a child Actor). > > Regards, > > Roland > > 24 jul 2015 kl. 20:13 skrev slowhandblues <[email protected]>: > > Hi, > > Thanks for the response. Actually we are not creating any separate actor > for log (unless akka creates internally). How do we identify the actor? The > way we are trying to write logs is pretty much same as defined in akka > documentation (http://doc.akka.io/docs/akka/2.0/java/logging.html) along > with logback. > > On Friday, 24 July 2015 17:22:02 UTC+5:30, slowhandblues wrote: >> >> We have an application in Akka and having a problem with increasing heap >> memory that is growing with time and eventually crashing the application. >> On analyzing the heap dump we can see all our log entries are getting >> persisted in the memory. Below is object tree for the same >> >> Akka dispatcher --> Unbounded mail box --> concurrent linked queue --> >> envelop object consisting of all the log information >> >> Our actors are untyped actor and we are using akka default event logger >> for logging >> >> Any idea what could be the problem with this? >> >> >> Thanks, >> >> Somak >> > > -- > >>>>>>>>>> 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 [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/d/optout. > > > > > *Dr. Roland Kuhn* > *Akka Tech Lead* > Typesafe <http://typesafe.com/> – Reactive apps on the JVM. > twitter: @rolandkuhn > <http://twitter.com/#!/rolandkuhn> > > -- >>>>>>>>>> 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 [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/d/optout.
