[ 
https://issues.apache.org/jira/browse/CASSANDRA-5037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13609372#comment-13609372
 ] 

Brandon Williams commented on CASSANDRA-5037:
---------------------------------------------

bq. Given that the service runs as a custom user ('cassandra'), I am worried 
that we will have folks mess up which user to set that for (and I am hesitant 
to suggest /etc/profile for this). That way we can put a nice statement in the 
docs about changing cassandra-env.sh. We can do that of course without a 
preexisting value, but having that would also allow us to eventually do auto 
configuration of such a value during installation.

It's already in there and off by default, we could add more explanation than 
the current "set jvm HeapDumpPath with CASSANDRA_HEAPDUMP_DIR" though.

bq. Is it possible to set that to the root of the configured data directory by 
default? That would get around the dangers of the root filesystem at least.

Nope.  Not to mention that's assuming one data directory to begin with.
                
> Set CASSANDRA_HEAPDUMP_DIR in cassandra-env.sh by default
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-5037
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5037
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Config
>    Affects Versions: 1.1.7, 1.2.0 beta 3
>            Reporter: J.B. Langston
>            Priority: Minor
>
> Cassandra is configured via -XX:+HeapDumpOnOutOfMemoryError to trigger a heap 
> dump at the occurrence of an OutOfMemoryError, but unless you have set your 
> CASSANDRA_HEAPDUMP_DIR in cassandra-env.sh, the file will be written in the 
> Cassandra process's working directory, which when Cassandra is run as a 
> service is typically the root directory. Nine times out of ten, the Cassandra 
> process does not have permission to write here so no heap dump is created. 
> Even if Cassandra does have permission, the root filesystem is usually small 
> and the heap dump could easily fill it up with a large Xmx configured. This 
> makes post-mortem analysis difficult. We should set it by default to e.g. 
> /var/log/cassandra.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to