1

I'm editing the Crate.yml file in order to start a new node, my file is:

cluster.name: name
node.name: "name"
node.master: true
node.data: true
CRATE_HEAP_SIZE: 4g

When setting up Crate heap with 4g of RAM, it doesn't work when creating the default first node (when Crate starts) it creates the node with 1gb.

How should I define the heap size in the config file?

Thanks a lot

gtonic
  • 2,295
  • 1
  • 24
  • 32

2 Answers2

4

CRATE_HEAP_SIZE isn't a setting that you can set in the crate.yml file but instead it is an environment variable that you have to set beforehand.

e.g in a shell:

export CRATE_HEAP_SIZE=4g
bin/crate

If you're using a RPM based distro and installed crate using yum you can also change the values in the configuration file under /etc/sysconfig/crate

mfussenegger
  • 3,931
  • 23
  • 18
1

edit the config file /etc/default/crate and put this code

CRATE_HEAP_SIZE=4g
MAX_OPEN_FILES=65535
MAX_LOCKED_MEMORY=unlimited

edit /etc/security/limits.conf and put this params

crate            -       nofile          65535
crate            -       memlock         unlimited

finally activate this parameter in the configuration file config.yml

bootstrap.mlockall: true
Draka
  • 160
  • 1
  • 8