背景当我使用多进程对多个文件夹同时进行批量建立索引时,出现以下错误
Traceback (most recent call last):
File "/test/linux/util/elasticsearch_util.py", line 211, in <module>
rl = pool.map(index_chile, dir_list)
File "/usr/local/lib/python2.7/multiprocessing/pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/local/lib/python2.7/multiprocessing/pool.py", line 567, in get
raise self._value
elasticsearch.exceptions.ConnectionError: ConnectionError(('Connection aborted.', error(104, 'Connection reset by peer'))) caused by: ProtocolError(('Connection aborted.', error(104, 'Connection reset by peer')))
与服务器内存和cpu有关系么?还是其他什么原因呢?求大佬教下,谢谢啦。
Traceback (most recent call last):
File "/test/linux/util/elasticsearch_util.py", line 211, in <module>
rl = pool.map(index_chile, dir_list)
File "/usr/local/lib/python2.7/multiprocessing/pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/local/lib/python2.7/multiprocessing/pool.py", line 567, in get
raise self._value
elasticsearch.exceptions.ConnectionError: ConnectionError(('Connection aborted.', error(104, 'Connection reset by peer'))) caused by: ProtocolError(('Connection aborted.', error(104, 'Connection reset by peer')))
与服务器内存和cpu有关系么?还是其他什么原因呢?求大佬教下,谢谢啦。
2 个回复
Cheetah
赞同来自: qq402424088
kennywu76 - Wood
赞同来自: qq402424088
如果一次bulk发送的内容过多,可能超过限制,也会遇到上面的报错。 可以查一下ES一端的日志是否有对应的内容超长错误。 参考https://www.elastic.co/guide/e ... .html