Setting crate.yml parameter network.host prevents Crate of being started
See original GitHub issueCrateDB version: 4.2.4
Environment description: Intel® Core™ i7-6650U CPU @ 2.20GHz OS: Windows 10 Pro / CentOS 7
Problem description:
Windows
Default Crate config is being used; only crate.yml parameter network.host
is explicitly set (refers to local host’s IP address). Attempt to start Crate ends with following error:
ERROR: [1] bootstrap checks failed [1]: initial heap size [268435456] not equal to maximum heap size [1073741824]; this can cause resize pauses and prevents mlockall from locking the entire heap
If I add following lines to crate.bat:
if "%CRATE_HEAP_SIZE%" == "" (
set CRATE_HEAP_SIZE=2g
)
just before the statement:
if NOT "%CRATE_HEAP_SIZE%" == "" (
set CRATE_MIN_MEM=%CRATE_HEAP_SIZE%
set CRATE_MAX_MEM=%CRATE_HEAP_SIZE%
)
then the problem disappears.
CentOS
By using the same (default) config, and setting crate.yml parameter network.host
to local host’s IP address, attempt to start Crate (by the shell command sudo systemctl start crate
) is successfull. There is no need to change crate.in.sh file.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
I think we might want to go the opposite route and change the defaults in the CentOS packages. 512M is rather low.
We need to balance between first use experience which should just work - but also need to ensure that people configure their nodes properly.
This is why CrateDB by default binds itself to localhost where it disables bootstrap checks and allows a “best effort” cluster bootstrapping with other nodes running locally. This allows users to try it easily.
Once the configuration is changed and CrateDB is bound to a public interface, the bootstrap checks are enforced and there needs to be a proper configuration for it to form a cluster. This is to ensure that some settings that absolutely should be changed in production are set up accordingly. The heap size is one of the properties that has a big impact on the performance, so it should always be set.
Dear Mathias,
thanks a bunch for the elaboration, specifically for all others reading here. Does our documentation reflect these details both well and concise enough? Also as a reference for others, I am referencing [1], [2] and [3] here.
Sure, this is a very important detail.
After rereading the original post by @ag-rbr
and trying to start CrateDB on my own behalf by using the ad hoc scripts, I recognize that this is really just a warning message instead of an error. I misinterpreted the issue that the machinery wouldn’t start using
crate.bat
on Windows at all, so sorry for the noise.With kind regards, Andreas.
[1] https://crate.io/docs/crate/howtos/en/latest/admin/bootstrap-checks.html [2] https://crate.io/docs/crate/howtos/en/latest/performance/memory.html [3] https://crate.io/docs/crate/reference/en/latest/config/environment.html
P.S.
I had the same impression when finding this. Shall we just go ahead and increase these numbers to 2048M within the sysinit/systemd scripts?