[
https://issues.apache.org/jira/browse/CASSANDRA-13006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16135080#comment-16135080
]
Benjamin Lerer commented on CASSANDRA-13006:
--------------------------------------------
[~urandom] Sorry, this ticket felt out of my radar.
bq. IMO, the sanest strategy here would be to leave the creation of heap dumps
to the JVM.
I fully agree with you.
Initially, we started to catch {{OOM}} errors to prevent C* to run in an
unknown state that could cause data corruption (see CASSANDRA-7507). The
problem with that approach was that Heap dumps were not created anymore on
{{OOM}} errors. I tried to fix that in CASSANDRA-9861 but that approach seems
to have some serious issues and limitations.
In April 2016, roughly at the same time that I was fixing CASSANDRA-9861,
Oracle released the [JDK
8u92|http://www.oracle.com/technetwork/java/javase/8u92-relnotes-2949471.html]
which added 2 new JVM Options: {{ExitOnOutOfMemoryError}} and
{{CrashOnOutOfMemoryError}}.
With that in mind, my idea would be to:
# stop handling the {{OOM}} errors on the C* side (and producing Heap dump)
# add {{ExitOnOutOfMemoryError}} to the default JVM options in the startup
scripts
# in the {{News.txt}} upgrade procedure: request people to use a java version
>= {{8u92}}
[~JoshuaMcKenzie] you worked on CASSANDRA-7507. Do you have any concern with
the approach I am suggesting?
My only concern right now is that I know that some C* users are using Zing and
I do not if it support the {{ExitOnOutOfMemoryError}} option.
I asked the Zing support and will update the ticket as soon as I know more.
> Disable automatic heap dumps on OOM error
> -----------------------------------------
>
> Key: CASSANDRA-13006
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13006
> Project: Cassandra
> Issue Type: Bug
> Components: Configuration
> Reporter: anmols
> Assignee: Benjamin Lerer
> Priority: Minor
> Fix For: 3.0.9
>
> Attachments: 13006-3.0.9.txt
>
>
> With CASSANDRA-9861, a change was added to enable collecting heap dumps by
> default if the process encountered an OOM error. These heap dumps are stored
> in the Apache Cassandra home directory unless configured otherwise (see
> [Cassandra Support
> Document|https://support.datastax.com/hc/en-us/articles/204225959-Generating-and-Analyzing-Heap-Dumps]
> for this feature).
>
> The creation and storage of heap dumps aides debugging and investigative
> workflows, but is not be desirable for a production environment where these
> heap dumps may occupy a large amount of disk space and require manual
> intervention for cleanups.
>
> Managing heap dumps on out of memory errors and configuring the paths for
> these heap dumps are available as JVM options in JVM. The current behavior
> conflicts with the Boolean JVM flag HeapDumpOnOutOfMemoryError.
>
> A patch can be proposed here that would make the heap dump on OOM error honor
> the HeapDumpOnOutOfMemoryError flag. Users who would want to still generate
> heap dumps on OOM errors can set the -XX:+HeapDumpOnOutOfMemoryError JVM
> option.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]