Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

Too many open files

/etc/security/limits.d/elasticsearch.conf

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
fi

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

See generally:

http://www.elasticsearch.org/tutorials/too-many-open-files/

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

Your Answer

 
discard

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.