{ elasticsearch }

  • elasticsearch踩过的坑解决办法

    | /

    1、Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error=’Cannot allocate memory’ (errno=12)
    由于elasticsearch5.0默认分配jvm空间大小为2g,修改jvm空间分配

    1
    2
    3
    4
    5
    6
    vim config/jvm.options
    -Xms2g
    -Xmx2g
    修改为
    -Xms512m
    -Xmx512m

    2、max number of threads [1024] for user [elasticsearch] is too low, increase to at least [2048] 修改 /etc/security/limits.d/90-nproc.conf

    1
    2
    3
    soft nproc 1024

    soft nproc 2048
f="https://hexo.io">Hexo , Theme - Icalm