一段时间后,elasticsearch会停止使用Tyre对新文档建立索引 [英] elasticsearch stops indexing new documents after a while, using Tire

查看:49
本文介绍了一段时间后,elasticsearch会停止使用Tyre对新文档建立索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过Tire使用我的网站运行ElasticSearch.

I have my website running, with ElasticSearch, using Tire.

在后台,我有一个rake任务,它遍历数千个对象并为每个对象创建一条记录.

In the background, I have a rake task that is looping over thousands of objects and creating one record for each of them.

首先,对记录建立索引,并且每次刷新网站时,我可以看到找到的记录数上升.但是到了某个时候,它就停止了.它将记录保存到mysql,但不再对其进行索引.请注意,该站点和搜索仍在运行中.

At first, the records are indexed, and every time I refresh my website, I can see the number of records found go up. But at some point, it just stops. It saves the records to mysql, but does not index them anymore. Note that the site and the search are still up and running.

那是为什么?是否有某种锁或...?

Why is that? Is there some kind of lock or...?

这是我在 elasticsearch.log

[2013-03-16 08:49:34,344] [WARN] [netty.channel.socket.nio.AbstractNioSelector]无法接受连接.java.io.IOException:打开的文件太多

[2013-03-16 08:49:34,344][WARN ][netty.channel.socket.nio.AbstractNioSelector] Failed to accept a connection. java.io.IOException: Too many open files


[Thakos] [maps] [2]无法读取有关刷新的最新细分信息java.io.FileNotFoundException:/usr/local/share/elasticsearch/data/elasticsearch/nodes/0/indices/maps/2/index/segments_3(打开的文件太多)

[Thakos] [maps][2] failed to read latest segment infos on flush java.io.FileNotFoundException: /usr/local/share/elasticsearch/data/elasticsearch/nodes/0/indices/maps/2/index/segments_3 (Too many open files)

所以我想这是必须的,我需要看看如何处理此错误.

So I guess that's need, I need to look at how to deal with this error.

推荐答案

我基本上错过了安装指南"的重要部分:

I basically missed an important part of the "Installation guide": http://www.elasticsearch.org/guide/reference/setup/installation.html

运行弹性搜索的用户只有1024个打开的文件描述符,而我大约需要32k(最大设置为64k).

I only had like 1024 open file descriptors allowed for the user running elasticsearch, and I needed around 32k (max set to 64k).

使用这些设置,一切运行正常.

With these settings, everything's running perfectly.

这篇关于一段时间后,elasticsearch会停止使用Tyre对新文档建立索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆