我已经将数据批量加载到开发弹性搜索服务器中一段时间了。我正在使用C#进行编程,弹性搜索服务器正在Windows 2012 R2 Server上运行。弹性搜索服务器在批量加载过程中始终关闭我是唯一一个连接到服务器的人,所以这不是两个人试图访问或插入相同数据的问题。我不知道为什么会发生这种情况,而且看起来似乎不适合我的情况。崩溃我的意思是服务停止(错误输出)并重新启动。
这是我正在使用的代码。 (我最初把它设置为1000但是减少了因为它根本不会加载)
var waitHandle = new System.Threading.CountdownEvent(1);
var response = _client.BulkAll(employees, b => b.Index(indexName)
.BackOffRetries(3)
.BackOffTime("30s")
.RefreshOnCompleted(true)
.MaxDegreeOfParallelism(4)
.Size(100)
);
response.Subscribe(new BulkAllObserver(
onNext: (b) => { RaiseMessageEvent("."); },
onError: (e) => { throw e; },
onCompleted: () => waitHandle.Signal()
));
Windows事件查看器(错误):
The Elasticsearch 5.3.0 (elasticsearch-service-x64) service
terminated unexpectedly. It has done this 1 time(s). The
following corrective action will be taken in 60000
milliseconds: Restart the service.
弹性搜索服务器日志:
[2017-07-13T11:06:58,068][ERROR][o.e.t.n.Netty4Utils]
fatal error on the network layer
at org.elasticsearch.transport.netty4.Netty4Utils.maybeDie
(Netty4Utils.java:140)....
[2017-07-13T11:06:59,943][WARN ][o.e.m.j.JvmGcMonitorService]
[lm52Lqe] [gc][5070] overhead, spent [1.8s] collecting in the
last [1.8s]...
[2017-07-13T11:07:00,052][WARN ][o.e.h.n.Netty4HttpServerTransport]
[lm52Lqe] caught exception while handling client http traffic,
closing connection [id: 0x14bf2d5c, L:/192.168.2.75:9200 -
R:/10.2.0.70:59266]
java.lang.OutOfMemoryError: Java heap space...
[2017-07-13T11:06:58,079][ERROR]
[o.e.b.ElasticsearchUncaughtExceptionHandler]
[] fatal error in thread [Thread-62], exiting
java.lang.OutOfMemoryError: Java heap space ...