elasticsearch内存管理

来源:互联网 发布:fc2 最新域名 编辑:程序博客网 时间:2024/06/16 15:20

今天elasticsearch突然崩掉了,捉急,看看log是这样的:

$ cat elasticsearch-5.2/logs/zhujian_club.log[2017-04-05T13:23:43,919][INFO ][o.e.n.Node               ] [] initializing ...[2017-04-05T13:23:44,337][INFO ][o.e.e.NodeEnvironment    ] [d064jZw] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [23.5gb], net total_space [39.2gb], spins? [no], types [ext4][2017-04-05T13:23:44,338][INFO ][o.e.e.NodeEnvironment    ] [d064jZw] heap size [1.9gb], compressed ordinary object pointers [true][2017-04-05T13:23:44,492][INFO ][o.e.n.Node               ] node name [d064jZw] derived from node ID [d064jZwnTYis8MVNX3ArIw]; set [node.name] to override[2017-04-05T13:23:44,508][INFO ][o.e.n.Node               ] version[5.2.0], pid[27864], build[24e05b9/2017-01-24T19:52:35.800Z], OS[Linux/3.13.0-65-generic/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_121/25.121-b13][2017-04-05T13:23:52,136][INFO ][o.e.p.PluginsService     ] [d064jZw] loaded module [aggs-matrix-stats][2017-04-05T13:23:52,136][INFO ][o.e.p.PluginsService     ] [d064jZw] loaded module [ingest-common][2017-04-05T13:23:52,137][INFO ][o.e.p.PluginsService     ] [d064jZw] loaded module [lang-expression][2017-04-05T13:23:52,137][INFO ][o.e.p.PluginsService     ] [d064jZw] loaded module [lang-groovy][2017-04-05T13:23:52,137][INFO ][o.e.p.PluginsService     ] [d064jZw] loaded module [lang-mustache][2017-04-05T13:23:52,137][INFO ][o.e.p.PluginsService     ] [d064jZw] loaded module [lang-painless][2017-04-05T13:23:52,137][INFO ][o.e.p.PluginsService     ] [d064jZw] loaded module [percolator][2017-04-05T13:23:52,137][INFO ][o.e.p.PluginsService     ] [d064jZw] loaded module [reindex][2017-04-05T13:23:52,137][INFO ][o.e.p.PluginsService     ] [d064jZw] loaded module [transport-netty3][2017-04-05T13:23:52,137][INFO ][o.e.p.PluginsService     ] [d064jZw] loaded module [transport-netty4][2017-04-05T13:23:52,142][INFO ][o.e.p.PluginsService     ] [d064jZw] loaded plugin [analysis-ik][2017-04-05T13:24:04,175][INFO ][o.e.n.Node               ] initialized[2017-04-05T13:24:04,175][INFO ][o.e.n.Node               ] [d064jZw] starting ...[2017-04-05T13:24:04,935][INFO ][o.e.t.TransportService   ] [d064jZw] publish_address {139.129.19.240:9300}, bound_addresses {0.0.0.0:9300}[2017-04-05T13:24:04,956][INFO ][o.e.b.BootstrapChecks    ] [d064jZw] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks[2017-04-05T13:24:08,760][WARN ][o.e.m.j.JvmGcMonitorService] [d064jZw] [gc][young][2][8] duration [2.5s], collections [1]/[3.5s], total [2.5s]/[8.5s], memory [60.7mb]->[60.1mb]/[1.9gb], all_pools {[young] [32.9mb]->[16.5mb]/[66.5mb]}{[survivor] [8.3mb]->[5.5mb]/[8.3mb]}{[old] [19.8mb]->[38.1mb]/[1.9gb]}[2017-04-05T13:24:08,765][WARN ][o.e.m.j.JvmGcMonitorService] [d064jZw] [gc][2] overhead, spent [2.5s] collecting in the last [3.5s][2017-04-05T13:24:08,858][INFO ][o.e.c.s.ClusterService   ] [d064jZw] new_master {d064jZw}{d064jZwnTYis8MVNX3ArIw}{oUNqyCgfSxSPLyAbFwpXMA}{139.129.19.240}{139.129.19.240:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)[2017-04-05T13:24:08,967][INFO ][o.e.h.HttpServer         ] [d064jZw] publish_address {139.129.19.240:9200}, bound_addresses {0.0.0.0:9200}[2017-04-05T13:24:09,282][INFO ][o.e.n.Node               ] [d064jZw] started[2017-04-05T13:24:09,560][INFO ][o.w.a.d.Monitor          ] try load config from /home/master_user/elasticsearch-5.2/config/analysis-ik/IKAnalyzer.cfg.xml[2017-04-05T13:24:09,568][INFO ][o.w.a.d.Monitor          ] try load config from /home/master_user/elasticsearch-5.2/plugins/ik/config/IKAnalyzer.cfg.xml[2017-04-05T13:24:14,227][WARN ][o.e.m.j.JvmGcMonitorService] [d064jZw] [gc][young][5][9] duration [3.1s], collections [1]/[3.4s], total [3.1s]/[11.6s], memory [79mb]->[76mb]/[1.9gb], all_pools {[young] [35.2mb]->[764kb]/[66.5mb]}{[survivor] [5.5mb]->[8.3mb]/[8.3mb]}{[old] [38.1mb]->[67.1mb]/[1.9gb]}[2017-04-05T13:24:14,227][WARN ][o.e.m.j.JvmGcMonitorService] [d064jZw] [gc][5] overhead, spent [3.1s] collecting in the last [3.4s][2017-04-05T13:24:14,361][INFO ][o.w.a.d.Monitor          ] [Dict Loading] custom/mydict.dic[2017-04-05T13:24:14,392][INFO ][o.w.a.d.Monitor          ] [Dict Loading] custom/single_word_low_freq.dic[2017-04-05T13:24:14,452][INFO ][o.w.a.d.Monitor          ] [Dict Loading] custom/ext_stopword.dic[2017-04-05T13:24:15,759][INFO ][o.e.g.GatewayService     ] [d064jZw] recovered [2] indices into cluster_state[2017-04-05T13:24:17,376][INFO ][o.e.c.r.a.AllocationService] [d064jZw] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[index][0]] ...]).[2017-04-05T13:24:33,846][WARN ][o.e.m.j.JvmGcMonitorService] [d064jZw] [gc][young][22][10] duration [2.7s], collections [1]/[3.6s], total [2.7s]/[14.4s], memory [139.4mb]->[95.2mb]/[1.9gb], all_pools {[young] [63.9mb]->[2.2mb]/[66.5mb]}{[survivor] [8.3mb]->[8.3mb]/[8.3mb]}{[old] [67.1mb]->[84.7mb]/[1.9gb]}[2017-04-05T13:24:33,846][WARN ][o.e.m.j.JvmGcMonitorService] [d064jZw] [gc][22] overhead, spent [2.7s] collecting in the last [3.6s]

并没有什么error,但是最后是这样的:

[2017-04-05T13:24:33,846][WARN ][o.e.m.j.JvmGcMonitorService] [d064jZw] [gc][young][22][10] duration [2.7s], collections [1]/[3.6s], total [2.7s]/[14.4s], memory [139.4mb]->[95.2mb]/[1.9gb], all_pools {[young] [63.9mb]->[2.2mb]/[66.5mb]}{[survivor] [8.3mb]->[8.3mb]/[8.3mb]}{[old] [67.1mb]->[84.7mb]/[1.9gb]}[2017-04-05T13:24:33,846][WARN ][o.e.m.j.JvmGcMonitorService] [d064jZw] [gc][22] overhead, spent [2.7s] collecting in the last [3.6s]

JVM出问题了。
检索了一下,原来elasticsearch的JVM默认size为2g(使用版本5.2),阿里云总共才1g。。
去config/jvm.options修改内存:

Xmx=300mXms=300m
0 0
原创粉丝点击