Thanks for sharing. Yes, -XX:+HeapDumpOnOutOfMemoryError is on the JVM
level, and the dump is taken when the OutOfMemoryError is thrown.
Documented here:
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

/Patrik

On Tue, Oct 21, 2014 at 4:39 PM, Sébastien Lorber <
[email protected]> wrote:

> For those interested, I was wondering how this default affect some JVM
> options like -XX:+HeapDumpOnOutOfMemoryError
>
> It turns out even if Akka is exiting the JVM still does the heap dump.
>
> (I think it could be nice to document this behavior because I was tempted
> to disable it, before seeing I had a problem with play app startup script)
>
>
> On Thursday, May 3, 2012 6:02:23 PM UTC+2, Jonas Bonér wrote:
>>
>> Akka's (and the actor model's) default error handling scheme is fail
>> fast/crash early.
>>
>> Exiting the JVM is brutal, but I think that doing it on fatal error is
>> the correct default. We will give more options how to react on that
>> once the clustering is out.
>>
>> But I agree that a log message that we are indeed exiting the JVM is
>> in place.  Created ticket:
>> http://www.assembla.com/spaces/akka/tickets/2042-
>> improve-logging-when-exiting-jvm-due-to-fatal-error
>>
>> On Thu, May 3, 2012 at 4:51 PM, Dan Z <[email protected]> wrote:
>> > Hey All,
>> > We are running akka with great success - so thank you for the hard
>> > work.  We had an issue where, in one of our webapps, a java.lang.Error
>> > was thrown by code getting executed under the watchful gaze of
>> > ActorSystemImpl and then because we did not manage it, it propagated
>> > to ActorSystemImpl which then shut down the entire jvm, and in our
>> > case this meant the servlet container and all webapps, including (of
>> > course) those that had nothing to do with our akka-powered webapp.
>> >
>> > We found the preference for disabling this, so thank you for having
>> > that available too :), but I wanted to through out the feedback that
>> > the default value "on" for this configuration setting is perhaps
>> > rather aggressive.
>> >
>> > If there is great justification for this to be "on" by default, then
>> > perhaps some more verbose logging would be appropriate?
>> >
>> >  protected def uncaughtExceptionHandler:
>> > Thread.UncaughtExceptionHandler =
>> >    new Thread.UncaughtExceptionHandler() {
>> >      def uncaughtException(thread: Thread, cause: Throwable): Unit =
>> > {
>> >        log.error(cause, "Uncaught error from thread [{}]",
>> > thread.getName)   <<<<<<<< this is good, but when we saw it, we did
>> > not assume...
>> >        cause match {
>> >          case NonFatal(_) | _: InterruptedException ‚áí
>> >          case _ if settings.JvmExitOnFatalError     ‚áí
>> > System.exit(-1)  <<<<<<<< ...that this was coming next.  perhaps a log
>> > entry here?
>> >          case _                                     ‚áí shutdown()
>> >        }
>> >      }
>> >    }
>> >
>> > Thanks,
>> > DZ
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "Akka User List" group.
>> > To post to this group, send email to [email protected].
>> > To unsubscribe from this group, send email to akka-user+...@
>> googlegroups.com.
>> > For more options, visit this group at http://groups.google.com/
>> group/akka-user?hl=en.
>> >
>>
>> --
>> Jonas Bonér
>> CTO
>> Typesafe - The software stack for applications that scale
>> Phone: +46 733 777 123
>> Twitter: @jboner
>>
>  --
> >>>>>>>>>> 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.
>



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

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