# Too many open files

**URL:** <https://discuss.elastic.co/t/too-many-open-files/5777>\
**Category:** Elasticsearch\
**Created:** [November 4, 2011, 9:07pm UTC](https://discuss.elastic.co/t/too-many-open-files/5777 "2011-11-04T21:07:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_2](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Alex\_2](https://discuss.elastic.co/u/Alex_2)\
**Post date:** [November 4, 2011, 9:07pm UTC](https://discuss.elastic.co/t/too-many-open-files/5777/1 "2011-11-04T21:07:44Z")

</div>

Hi Shay

after replacing the .war file and restarting the server, I get the  
following error: [https://gist.github.com/1340424](https://gist.github.com/1340424)  
I'm using v. 0.18.2 with aws-s3. I never got such error with previous  
versions. The exception is thrown when the _first_ user accesses the  
servlet.  
What's going on?

Thanks!

Cheers  
Alex

---

<div class="post-metadata">

**Author:** ![Huy\_Le](https://avatars.discourse-cdn.com/v4/letter/h/f17d59/32.png) [@Huy\_Le](https://discuss.elastic.co/u/Huy_Le)\
**Post date:** [November 4, 2011, 9:23pm UTC](https://discuss.elastic.co/t/too-many-open-files/5777/2 "2011-11-04T21:23:33Z")

</div>

Not sure if v. 0.18.2 is using more file descriptor. We configured  
our with 80,000 file descriptor. It was running fine with 0.17.x.  
Upgraded to 0.18.2 5 days ago, and just got too open file error  
today. Just bumped limit to 140,000.

Huy

On Nov 4, 5:07 pm, Alex [alessandro.ussegliovire...@gmail.com](mailto:alessandro.ussegliovire...@gmail.com) wrote:

> Hi Shay
> 
> after replacing the .war file and restarting the server, I get the  
> following error:[Too many open files error when restarting server · GitHub](https://gist.github.com/1340424)  
> I'm using v. 0.18.2 with aws-s3. I never got such error with previous  
> versions. The exception is thrown when the _first_ user accesses the  
> servlet.  
> What's going on?
> 
> Thanks!
> 
> Cheers  
> Alex

---

<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:** [November 8, 2011, 3:45am UTC](https://discuss.elastic.co/t/too-many-open-files/5777/3 "2011-11-08T03:45:56Z")

</div>

0.18.x should not use more file descriptors than 0.17. Can you tell which  
file descriptors are being used by the process (lsof -p), or, if anything  
else changed except for the version bump?

On Fri, Nov 4, 2011 at 11:23 PM, Huy Le [huyle@leveragingit.com](mailto:huyle@leveragingit.com) wrote:

> Not sure if v. 0.18.2 is using more file descriptor. We configured  
> our with 80,000 file descriptor. It was running fine with 0.17.x.  
> Upgraded to 0.18.2 5 days ago, and just got too open file error  
> today. Just bumped limit to 140,000.
> 
> Huy
> 
> On Nov 4, 5:07 pm, Alex [alessandro.ussegliovire...@gmail.com](mailto:alessandro.ussegliovire...@gmail.com) wrote:
> 
> > Hi Shay
> > 
> > after replacing the .war file and restarting the server, I get the  
> > following error:[Too many open files error when restarting server · GitHub](https://gist.github.com/1340424)  
> > I'm using v. 0.18.2 with aws-s3. I never got such error with previous  
> > versions. The exception is thrown when the _first_ user accesses the  
> > servlet.  
> > What's going on?
> > 
> > Thanks!
> > 
> > Cheers  
> > Alex

---

<div class="post-metadata">

**Author:** ![Huy\_Le](https://avatars.discourse-cdn.com/v4/letter/h/f17d59/32.png) [@Huy\_Le](https://discuss.elastic.co/u/Huy_Le)\
**Post date:** [November 8, 2011, 1:55pm UTC](https://discuss.elastic.co/t/too-many-open-files/5777/4 "2011-11-08T13:55:58Z")

</div>

In our case, only configuration/application change is es version  
change. However, we do have higher traffic load than we used to.  
lsof shows almost all of the file descriptors used were on files in ES  
data directory (nodes/0/indices). Here is outrcluster info:

{  
"active\_primary\_shards": 60,  
"active\_shards": 180,  
"cluster\_name": "MyCluster",  
"initializing\_shards": 0,  
"number\_of\_data\_nodes": 6,  
"number\_of\_nodes": 6,  
"relocating\_shards": 0,  
"status": "green",  
"timed\_out": false,  
"unassigned\_shards": 0  
}

This is on a cluster with 2 indices and 2 replicas.

Huy

On Nov 7, 10:45 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> 0.18.x should not use more file descriptors than 0.17. Can you tell which  
> file descriptors are being used by the process (lsof -p), or, if anything  
> else changed except for the version bump?
> 
> On Fri, Nov 4, 2011 at 11:23 PM, Huy Le [hu...@leveragingit.com](mailto:hu...@leveragingit.com) wrote:
> 
> > Not sure if v. 0.18.2 is using more file descriptor. We configured  
> > our with 80,000 file descriptor. It was running fine with 0.17.x.  
> > Upgraded to 0.18.2 5 days ago, and just got too open file error  
> > today. Just bumped limit to 140,000.
> 
> > Huy
> 
> > On Nov 4, 5:07 pm, Alex [alessandro.ussegliovire...@gmail.com](mailto:alessandro.ussegliovire...@gmail.com) wrote:
> > 
> > > Hi Shay
> 
> > > after replacing the .war file and restarting the server, I get the  
> > > following error:[Too many open files error when restarting server · GitHub](https://gist.github.com/1340424)  
> > > I'm using v. 0.18.2 with aws-s3. I never got such error with previous  
> > > versions. The exception is thrown when the _first_ user accesses the  
> > > servlet.  
> > > What's going on?
> 
> > > Thanks!
> 
> > > Cheers  
> > > Alex

---

<div class="post-metadata">

**Author:** ![Huy\_Le](https://avatars.discourse-cdn.com/v4/letter/h/f17d59/32.png) [@Huy\_Le](https://discuss.elastic.co/u/Huy_Le)\
**Post date:** [November 8, 2011, 2:01pm UTC](https://discuss.elastic.co/t/too-many-open-files/5777/5 "2011-11-08T14:01:19Z")

</div>

At the time the issue occurred, there were 79501 files in data  
directory nodes/0/indices/\*. It seems like there were too many  
segment files got created.

Huy

On Nov 8, 8:55 am, Huy Le [hu...@leveragingit.com](mailto:hu...@leveragingit.com) wrote:

> In our case, only configuration/application change is es version  
> change. However, we do have higher traffic load than we used to.  
> lsof shows almost all of the file descriptors used were onfilesin ES  
> data directory (nodes/0/indices). Here is outrcluster info:
> 
> {  
> "active\_primary\_shards": 60,  
> "active\_shards": 180,  
> "cluster\_name": "MyCluster",  
> "initializing\_shards": 0,  
> "number\_of\_data\_nodes": 6,  
> "number\_of\_nodes": 6,  
> "relocating\_shards": 0,  
> "status": "green",  
> "timed\_out": false,  
> "unassigned\_shards": 0
> 
> }
> 
> This is on a cluster with 2 indices and 2 replicas.
> 
> Huy
> 
> On Nov 7, 10:45 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > 0.18.x should not use more file descriptors than 0.17. Can you tell which  
> > file descriptors are being used by the process (lsof -p), or, if anything  
> > else changed except for the version bump?
> 
> > On Fri, Nov 4, 2011 at 11:23 PM, Huy Le [hu...@leveragingit.com](mailto:hu...@leveragingit.com) wrote:
> > 
> > > Not sure if v. 0.18.2 is using more file descriptor. We configured  
> > > our with 80,000 file descriptor. It was running fine with 0.17.x.  
> > > Upgraded to 0.18.2 5 days ago, and just gottooopen file error  
> > > today. Just bumped limit to 140,000.
> 
> > > Huy
> 
> > > On Nov 4, 5:07 pm, Alex [alessandro.ussegliovire...@gmail.com](mailto:alessandro.ussegliovire...@gmail.com) wrote:
> > > 
> > > > Hi Shay
> 
> > > > after replacing the .war file and restarting the server, I get the  
> > > > following error:[Too many open files error when restarting server · GitHub](https://gist.github.com/1340424)  
> > > > I'm using v. 0.18.2 with aws-s3. I never got such error with previous  
> > > > versions. The exception is thrown when the _first_ user accesses the  
> > > > servlet.  
> > > > What's going on?
> 
> > > > Thanks!
> 
> > > > Cheers  
> > > > Alex

---

<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, 3:49am UTC](https://discuss.elastic.co/t/too-many-open-files/5777/6 "2017-07-06T03:49:34Z")

</div>

Closed on July 6, 2017, 3:49am UTC


