Cassandra does not start or gives an exception error "java.lang.OutOfMemoryError: Java heap space
Solution:
- Download all OCC services
- Download Cassandra and change the MAX_HEAP_SIZE and HEAP _NEWSIZE parameters by uncommenting the # in /etc/cassandra/cassandra-env.sh
-
MAX_HEAP_SIZE="16G"
-
HEAP _NEWSIZE="4096M"
-
- Start Cassandra and check nodetool status which comes up ok.
- Start all services in the environment.
- Confirm that the platform is OK, log in as administrator.
- Pass job_repair to repair inconsistent interactions
- In order for the change to be persistent in the next Chef execution and not be lost, the change must also be made to the Cassandra data_bag:
- Make a backup of the file before editing it.
- In the file /etc/inconcert/chef/data_bags/cassandra_clusters/default.json
- Add the lines with the same values entered in point 2 :
"max_heap_size" :"16G",
"heap_new_size" : "4096M"