# V0.12 open file count increase?

**URL:** https://discuss.elastic.co/t/v0-12-open-file-count-increase/3457
**Category:** Elasticsearch
**Created:** [October 19, 2010, 10:13pm UTC](https://discuss.elastic.co/t/v0-12-open-file-count-increase/3457 "2010-10-19T22:13:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pzelnip](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pzelnip/32/3251_2.png) [@pzelnip](https://discuss.elastic.co/u/pzelnip)
#### Post date: [October 19, 2010, 10:13pm UTC](https://discuss.elastic.co/t/v0-12-open-file-count-increase/3457/1 "2010-10-19T22:13:22Z")

</div>

Has the number of files open at once by ES increased dramatically in  
v0.11 or v0.12? Code that previously ran under v0.10 is now  
consistently crashing with "too many open files" errors, and cat /proc/  
sys/fs/file-max on the system ES is running on is reporting over 1M  
file descriptors available.

---

<div class="post-metadata">

### Author: ![Paul\_Loy](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@Paul\_Loy](https://discuss.elastic.co/u/Paul_Loy)
#### Post date: [October 19, 2010, 10:28pm UTC](https://discuss.elastic.co/t/v0-12-open-file-count-increase/3457/2 "2010-10-19T22:28:54Z")

</div>

ulimit is a better number to get as file-max is for the entire system  
whereas ulimit is per process.

To see how many files elasticsearch has open, simply do an lsof.

lsof -p \<process\_id\_of\_es\> | wc -l

How many does this come up with?

On Tue, Oct 19, 2010 at 11:13 PM, Adam Parkin [pzelnip@gmail.com](mailto:pzelnip@gmail.com) wrote:

> Has the number of files open at once by ES increased dramatically in  
> v0.11 or v0.12? Code that previously ran under v0.10 is now  
> consistently crashing with "too many open files" errors, and cat /proc/  
> sys/fs/file-max on the system ES is running on is reporting over 1M  
> file descriptors available.

## --

Paul Loy  
[paul@keteracel.com](mailto:paul@keteracel.com)  
[http://uk.linkedin.com/in/paulloy](http://uk.linkedin.com/in/paulloy)

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [October 19, 2010, 10:36pm UTC](https://discuss.elastic.co/t/v0-12-open-file-count-increase/3457/3 "2010-10-19T22:36:13Z")

</div>

Hi,

yes, the format the index is stored was changed from compound format to  
non compound format in v0.11. Here is the issue:  
[Issues · elastic/elasticsearch · GitHub](http://github.com/elasticsearch/elasticsearch/issues/closed#issue/384) (it  
also explains how to set back to using the non compound format). The reason  
for this is better performance and IO behavior when using the non compound  
format, at the expense of more file descriptors open.

Can you check with ulimit? How many indices and shards are you creating?  
How many machines do you have? What is your ulimit setting now? Bumping it  
up to 32k is usually good for most systems.

-shay.banon

On Wed, Oct 20, 2010 at 12:28 AM, Paul Loy [keteracel@gmail.com](mailto:keteracel@gmail.com) wrote:

> ulimit is a better number to get as file-max is for the entire system  
> whereas ulimit is per process.
> 
> To see how many files elasticsearch has open, simply do an lsof.
> 
> lsof -p \<process\_id\_of\_es\> | wc -l
> 
> How many does this come up with?
> 
> On Tue, Oct 19, 2010 at 11:13 PM, Adam Parkin [pzelnip@gmail.com](mailto:pzelnip@gmail.com) wrote:
> 
> > Has the number of files open at once by ES increased dramatically in  
> > v0.11 or v0.12? Code that previously ran under v0.10 is now  
> > consistently crashing with "too many open files" errors, and cat /proc/  
> > sys/fs/file-max on the system ES is running on is reporting over 1M  
> > file descriptors available.
> 
> ## --
> 
> Paul Loy  
> [paul@keteracel.com](mailto:paul@keteracel.com)  
> [Paul Loy - Amihan Entertainment | LinkedIn](http://uk.linkedin.com/in/paulloy)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 4:17am UTC](https://discuss.elastic.co/t/v0-12-open-file-count-increase/3457/4 "2017-07-06T04:17:49Z")

</div>


