This even can break with a production grade logger.  I've overflowed the 
logger's mailbox with Logback.  It seems to me that this behavior breaks 
the contract of most loggers like Logback by not propagating the actual 
logging config up to the Akka logger facade.  Simply setting "DEBUG" for 
all loggers is far less granular than what Logback supports underneath.  If 
I disable debug in the Logback config for a certain logger then I expect 
those debug messages should never even be sent to the loggers mailbox. 
 Even though it's not a good idea to do debug logging in production, it 
should be possible to set debug level for a certain class of loggers and 
not completely overwhelm the logger with extraneous messages from other 
loggers.

-Josh

On Tuesday, December 10, 2013 4:42:38 PM UTC-7, √ wrote:
>
> Hi Pierre,
>
> Ok. You definitely need to switch to a production-grade logger, you'll 
> find everything you need in the documentation on logging.
> Since logging in Akka is just an Actor you can configure the mailbox etc 
> as with any actor.
>
> Happy hAkking!
>
> Cheers,
> √
>
>
> On Wed, Dec 11, 2013 at 1:32 AM, Pierre Andrews <[email protected] 
> <javascript:>> wrote:
>
>> Hi Viktor,
>>
>> this is not coming from my loggers, but from switching on the akka 
>> logging:
>>
>> akka.actor.debug.receive = on
>> akka.loglevel = "DEBUG"
>>
>> in the application.conf, so it’s the logging stream of Akka, the doc 
>> page: http://doc.akka.io/docs/akka/snapshot/java/logging.html mentions 
>> that it’s logged on stdout (and I can change to log4j etc.).
>>
>> I guess the question is how do I control the mailbox of the akka logging 
>> event-stream and how long messages are kept in the stream? A bounded 
>> mailbox doesn’t seem to be the right solution as it would drop new log 
>> message and keep old messages.
>>
>>
>> Thanks
>>
>>
>> Pierre
>>
>> On Tuesday, 10 December 2013 19:53:00 UTC-2, √ wrote:
>>
>> Hi Pierre,
>>>
>>> 3 possible solutions:
>>>
>>> A) Bulkhead your logger
>>> B) Bound its mailbox so you drop overflow
>>> C) Switch to a more performant logging library (like Logback or 
>>> otherwise)
>>>
>>> Does that help?
>>>
>>> Cheers,
>>> √
>>>
>>>
>>> On Tue, Dec 10, 2013 at 8:40 PM, Pierre Andrews <[email protected]> 
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I have been profiling the memory usage of my akka app to get ready to 
>>>> put it in prod, but after a couple hours of running, it eventually runs 
>>>> out 
>>>> of heap. I have currently set the heap to 4Gb, but it runs out of memory 
>>>> with bigger heaps, it's just a question of time.
>>>>
>>>> So, I took a heap dump and opened it with Eclipse Memory Analyser (a 
>>>> bit like jhat, but slightly more user friendly). What I see is a 
>>>> dispatcher 
>>>> taking around around 93% of the used heap (see attached screenshot). If I 
>>>> check what's in that dispatcher's mailbox, it seems to be messages of type 
>>>> akka.event.Logging$Debug (see attached screenshot).
>>>>
>>>> I am now running the app without debug to see if there is some other 
>>>> leak, but I was wondering if there is a way to configure Akka to log the 
>>>> events (so I can see what's going on), but not to retain them forever on 
>>>> the event stream?
>>>>
>>>> Cheers
>>>>
>>>> Pierre
>>>>
>>>> -- 
>>>> >>>>>>>>>> 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 [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/groups/opt_out.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Cheers,
>>> √
>>>
>>> * Viktor Klang*
>>> *Director of Engineering*
>>> Typesafe <http://www.typesafe.com/>
>>>
>>> Twitter: @viktorklang
>>>  
>>  -- 
>> >>>>>>>>>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Cheers,
> √
>
> * Viktor Klang*
> *Director of Engineering*
> Typesafe <http://www.typesafe.com/>
>
> Twitter: @viktorklang
>  

-- 
>>>>>>>>>>      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.

Reply via email to