Hi Clinton,
Thanks for your reply. My responses below:
- what is in the elasticsearch logs
The logs are showing two different places where elasticsearch is
failing:
(a) [2011-12-09 01:15:02,818][DEBUG][action.index ]
[Professor X] [my_index][3], node[dakvMD03QOGADfRKG82MLA], [P],
s[STARTED]: Failed to execute [index {[my_index][my_type]
[4ee121f6db1bc0aa6e000000], source[{"name": "Abraham"}]}]
org.elasticsearch.index.engine.IndexFailedEngineException:
[my_index]3] Index failed for [my_type#4ee121f6db1bc0aa6e000000]
Caused by: java.io.FileNotFoundException: /etc/elasticsearch-0.14.3/
data/elasticsearch/nodes/0/indices/my_index/3/index/_n.tvx (Too many
open files)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.(RandomAccessFile.java:233)
at org.apache.lucene.store.SimpleFSDirectory
$SimpleFSIndexOutput.(SimpleFSDirectory.java:180)
at
org.apache.lucene.store.NIOFSDirectory.createOutput(NIOFSDirectory.java:
85)
(b) [2011-12-09 02:15:01,666][WARN ]
[netty.channel.socket.nio.NioServerSocketPipelineSink] Failed to
initialize an accepted socket.
org.elasticsearch.common.netty.channel.ChannelException: Failed to
create a selector.
- You're using a really old version
I am stuck to this old version because somehow porter_stem is not
working on version 0.18.4 which is one of the latest versions I tried.
Somehow porter_stem is working on the 0.14.3 packageand not on the
0.18.4 package- am I missing installation of some additional packages
or something?
- If you're doing a lot of requests, and not using persistent HTTP
connections
If you see the log I have posted, it says this: "Failed to initialize
an accepted socket.". Could this be due to the reason you have
mentioned in your third point?
- If you're not using the bootstrap.mlockall option ...
I will explore on this and see how I can include this.
Please help with your suggestions here.
Thanks,
Niranjan
On Dec 9, 3:57 pm, Clinton Gormley cl...@traveljury.com wrote:
HiNiranjan
On Fri, 2011-12-09 at 02:28 -0800,Niranjanwrote:
I am having a frequently occurring problem that is affecting the
stability of search feature on my website.
I have elasticsearch 0.14.3 installed and running on my website. Many
times, the http communication fails- I get no response. There are no
issues with my web server because my website is continuously up and
running.
For eg. when I run this:
curl -XGET 'http://localhost:9200/my_index/_search?pretty=true'-d '
{
"query":{
"matchAll":{}
}
}'
I get no response and this is the message that I get: curl: (56)
Failure when receiving data from the peer
A few things to consider:
- what is in the elasticsearch logs
- You're using a really old version - many bugs have been fixed since
then, consider upgrading
- If you're doing a lot of requests, and not using persistent HTTP
connections, you may be running out of sockets on your OS, and
things time out until your OS frees them up
- If you're not using the bootstrap.mlockall option (with the
ES_MIN_MEM and ES_MAX_MEM set appropriately, and ulimit -l unlimited)
then you may be running into issues with swap, which slows the
JVM to a crawl when doing garbage collection
clint