Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have deployed Elasticsearch on a development ubunto VPS. We use that VPS only to host Api for mobile apps.

Everything worked good till today, elasticsearch stops working. I tried to restart it, it says Server ok but when i check the status it gives me : is not running.

The Ruby on Rails app log contains : Errno::ECONNREFUSED (Connection refused - connect(2)) After that, i start getting this error : Too many open files

Does anyone can help me ? Thanks

share|improve this question

Too many open files


elasticsearch soft nofile 32000
elasticsearch hard nofile 32000

The look at your init script for the ulimit setting and raise it.

if [ -n "$MAX_OPEN_FILES" ]; then
    ulimit -n $MAX_OPEN_FILES

On my ubuntu server, I also had to edit /etc/defaults/elasticsearch.

See generally:

share|improve this answer
/etc/security/limits.d/ does not contains the file elasticsearch.conf Should i create it ? – OWZY Feb 22 '14 at 20:05
Do you mean /etc/security/limits ? – OWZY Feb 22 '14 at 23:16
No. The limits.d/*.conf files are read in as stub files. – dmourati Feb 27 '14 at 16:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.