# Error: Too many open files

**URL:** <https://discuss.elastic.co/t/error-too-many-open-files/4189>\
**Category:** Elasticsearch\
**Created:** [April 5, 2011, 8:35am UTC](https://discuss.elastic.co/t/error-too-many-open-files/4189 "2011-04-05T08:35:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enrique\_Medina\_Monte](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@Enrique\_Medina\_Monte](https://discuss.elastic.co/u/Enrique_Medina_Monte)\
**Post date:** [April 5, 2011, 8:35am UTC](https://discuss.elastic.co/t/error-too-many-open-files/4189/1 "2011-04-05T08:35:36Z")

</div>

Hi,

I know the error message is understandable, but I'd like to understand why  
and how to fix it. This is ES 0.16.0-SNAPSHOT (from master):

[2011-04-05 00:43:54,320][DEBUG][action.bulk] [Magik]  
[cuestamenos][0]: Failed to execute bulk item (index) [index  
{[cuestamenos][producto][AVxe4QXAS6qm6Nx5GPPQUg], source[{"nombre":"ADVAN  
CE Torre PC Chrome 8001B Carcasas PC","descripcion":"La Advance Chrome 8001B  
es una torre PC Moyen Tour Â robusta y elegante. Esta torre 8001B de  
480W...","linkProfundo":"[http://pdt.tradedoubler.com/cl](http://pdt.tradedoubler.com/cl)  
ick?a(1781229)p(15853)prod(802186777)ttid(5)url(http%3A%2F%  
[2Fwww.pixmania.com](http://2Fwww.pixmania.com)  
%2Fes%2Fes%2F8934880%2Fart%2Fadvance%2Ftorre-pc-chrome-8001b.html%3Fsrcid%3D348%26amp%3BPartenaire%3DTD%26amp%3BCodePromo%3Do  
ui)","imagen":"[http://pan.fotovista.com/dev/0/6/09668260/t\_09668260.jpg](http://pan.fotovista.com/dev/0/6/09668260/t_09668260.jpg)  
","historico":1262,"cantidad":49.9,"moneda":"EUR","categorias1":["Electrónica","Hogar","Informática"],"categorias2":["Textil","Vide  
ojuegos","Programas","Electrodomésticos","Menaje","Fotografía y  
video","Ordenadores y componentes","Muebles","Decoración e  
iluminación","Imagen y  
sonido"],"categorias3":[],"tienda":"Pixmania","marca":"A  
DVANCE","ean":"3700104417137","upc":"","isbn":""}]}]  
org.elasticsearch.index.engine.CreateFailedEngineException: [cuestamenos][0]  
Create failed for [producto#AVxe4QXAS6qm6Nx5GPPQUg]  
at  
org.elasticsearch.index.engine.robin.RobinEngine.create(RobinEngine.java:245)  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.create(InternalIndexShard.java:276)  
at  
org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:139)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:418)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.access$100(TransportShardReplicationOperationAction.java:233)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:331)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:619)  
Caused by: java.io.FileNotFoundException:  
/var/elasticsearch-0.16.0-SNAPSHOT/data/elasticsearch/nodes/0/indices/cuestamenos/0/index/\_f7.fdt  
(Too many open files)  
at java.io.RandomAccessFile.open(Native Method)  
at java.io.RandomAccessFile.(RandomAccessFile.java:212)  
at  
org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexOutput.(SimpleFSDirectory.java:180)  
at  
org.apache.lucene.store.NIOFSDirectory.createOutput(NIOFSDirectory.java:85)  
at  
org.elasticsearch.index.store.support.AbstractStore$StoreDirectory.createOutput(AbstractStore.java:283)  
at  
org.elasticsearch.index.store.support.AbstractStore$StoreDirectory.createOutput(AbstractStore.java:279)  
at org.apache.lucene.index.FieldsWriter.(FieldsWriter.java:65)  
at  
org.apache.lucene.index.StoredFieldsWriter.initFieldsWriter(StoredFieldsWriter.java:66)  
at  
org.apache.lucene.index.StoredFieldsWriter.finishDocument(StoredFieldsWriter.java:144)  
at  
org.apache.lucene.index.StoredFieldsWriter$PerDoc.finish(StoredFieldsWriter.java:192)  
at  
org.apache.lucene.index.DocumentsWriter$WaitQueue.writeDocument(DocumentsWriter.java:1559)  
at  
org.apache.lucene.index.DocumentsWriter$WaitQueue.add(DocumentsWriter.java:1578)  
at  
org.apache.lucene.index.DocumentsWriter.finishDocument(DocumentsWriter.java:1155)  
at  
org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:832)  
at  
org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:802)  
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1998)  
at  
org.elasticsearch.index.engine.robin.RobinEngine.innerCreate(RobinEngine.java:328)  
at  
org.elasticsearch.index.engine.robin.RobinEngine.create(RobinEngine.java:238)  
... 8 more

Any clues?

Salu2,  
Quique.

---

<div class="post-metadata">

**Author:** ![Joaquin\_Cuenca\_Abela](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Joaquin\_Cuenca\_Abela](https://discuss.elastic.co/u/Joaquin_Cuenca_Abela)\
**Post date:** [April 5, 2011, 8:46am UTC](https://discuss.elastic.co/t/error-too-many-open-files/4189/2 "2011-04-05T08:46:49Z")

</div>

Hi,

raise the no\_files of the user running elasticsearch, this is done  
typically adding to /etc/security/limits.conf the lines:

elasticsearch soft nofile 64000  
elasticsearch hard nofile 64000

test that it gets applied running:

sudo -u elasticsearch -s "ulimit -Hn"

If it doesn't get applied run:

egrep -r pam\_limits /etc/pam.d/

and check that all pam\_limits.so are not commented out.

if sudo -u elasticsearch -s "ulimit -Hn" returns 64000, but you still  
get the error on elasticsearch, you're probably running it through  
another program that doesn't support pam, a usual offender is  
supervisord. The only solution I know to this problem is to raise the  
nofile limit for the user running supervisord, but this will obviously  
raise the limit for all the processes running under supervisord, a non  
ideal situation.

Hope it helps,

Cheers,

On Tue, Apr 5, 2011 at 10:35 AM, Enrique Medina Montenegro  
[e.medina.m@gmail.com](mailto:e.medina.m@gmail.com) wrote:

> Hi,  
> I know the error message is understandable, but I'd like to understand why  
> and how to fix it. This is ES 0.16.0-SNAPSHOT (from master):  
> [2011-04-05 00:43:54,320][DEBUG][action.bulk] [Magik]  
> [cuestamenos][0]: Failed to execute bulk item (index) [index  
> {[cuestamenos][producto][AVxe4QXAS6qm6Nx5GPPQUg], source[{"nombre":"ADVAN  
> CE Torre PC Chrome 8001B Carcasas PC","descripcion":"La Advance Chrome 8001B  
> es una torre PC Moyen Tour Â robusta y elegante. Esta torre 8001B de  
> 480W...","linkProfundo":"[http://pdt.tradedoubler.com/cl](http://pdt.tradedoubler.com/cl)  
> ick?a(1781229)p(15853)prod(802186777)ttid(5)url(http%3A%2F%[2Fwww.pixmania.com](http://2Fwww.pixmania.com)%2Fes%2Fes%2F8934880%2Fart%2Fadvance%2Ftorre-pc-chrome-8001b.html%3Fsrcid%3D348%26amp%3BPartenaire%3DTD%26amp%3BCodePromo%3Do  
> ui)","imagen":"[http://pan.fotovista.com/dev/0/6/09668260/t\_09668260.jpg","historico":1262,"cantidad":49.9,"moneda":"EUR","categorias1":["Electrónica","Hogar","Informática"],"categorias2":["Textil","Vide](http://pan.fotovista.com/dev/0/6/09668260/t_09668260.jpg%22,%22historico%22:1262,%22cantidad%22:49.9,%22moneda%22:%22EUR%22,%22categorias1%22:%5B%22Electr%C3%B3nica%22,%22Hogar%22,%22Inform%C3%A1tica%22%5D,%22categorias2%22:%5B%22Textil%22,%22Vide)  
> ojuegos","Programas","Electrodomésticos","Menaje","Fotografía y  
> video","Ordenadores y componentes","Muebles","Decoración e  
> iluminación","Imagen y  
> sonido"],"categorias3":,"tienda":"Pixmania","marca":"A  
> DVANCE","ean":"3700104417137","upc":"","isbn":""}]}]  
> org.elasticsearch.index.engine.CreateFailedEngineException: [cuestamenos][0]  
> Create failed for [producto#AVxe4QXAS6qm6Nx5GPPQUg]  
> at  
> org.elasticsearch.index.engine.robin.RobinEngine.create(RobinEngine.java:245)  
> at  
> org.elasticsearch.index.shard.service.InternalIndexShard.create(InternalIndexShard.java:276)  
> at  
> org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:139)  
> at  
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:418)  
> at  
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.access$100(TransportShardReplicationOperationAction.java:233)  
> at  
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:331)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
> at java.lang.Thread.run(Thread.java:619)  
> Caused by: java.io.FileNotFoundException:  
> /var/elasticsearch-0.16.0-SNAPSHOT/data/elasticsearch/nodes/0/indices/cuestamenos/0/index/\_f7.fdt  
> (Too many open files)  
> at java.io.RandomAccessFile.open(Native Method)  
> at java.io.RandomAccessFile.(RandomAccessFile.java:212)  
> at  
> org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexOutput.(SimpleFSDirectory.java:180)  
> at  
> org.apache.lucene.store.NIOFSDirectory.createOutput(NIOFSDirectory.java:85)  
> at  
> org.elasticsearch.index.store.support.AbstractStore$StoreDirectory.createOutput(AbstractStore.java:283)  
> at  
> org.elasticsearch.index.store.support.AbstractStore$StoreDirectory.createOutput(AbstractStore.java:279)  
> at org.apache.lucene.index.FieldsWriter.(FieldsWriter.java:65)  
> at  
> org.apache.lucene.index.StoredFieldsWriter.initFieldsWriter(StoredFieldsWriter.java:66)  
> at  
> org.apache.lucene.index.StoredFieldsWriter.finishDocument(StoredFieldsWriter.java:144)  
> at  
> org.apache.lucene.index.StoredFieldsWriter$PerDoc.finish(StoredFieldsWriter.java:192)  
> at  
> org.apache.lucene.index.DocumentsWriter$WaitQueue.writeDocument(DocumentsWriter.java:1559)  
> at  
> org.apache.lucene.index.DocumentsWriter$WaitQueue.add(DocumentsWriter.java:1578)  
> at  
> org.apache.lucene.index.DocumentsWriter.finishDocument(DocumentsWriter.java:1155)  
> at  
> org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:832)  
> at  
> org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:802)  
> at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1998)  
> at  
> org.elasticsearch.index.engine.robin.RobinEngine.innerCreate(RobinEngine.java:328)  
> at  
> org.elasticsearch.index.engine.robin.RobinEngine.create(RobinEngine.java:238)  
> ... 8 more  
> Any clues?  
> Salu2,  
> Quique.

--  
Joaquin Cuenca Abela -- [presspeople.com](http://presspeople.com): Fuentes de prensa y comunicados

---

<div class="post-metadata">

**Author:** ![Enrique\_Medina\_Monte](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@Enrique\_Medina\_Monte](https://discuss.elastic.co/u/Enrique_Medina_Monte)\
**Post date:** [April 5, 2011, 8:57am UTC](https://discuss.elastic.co/t/error-too-many-open-files/4189/3 "2011-04-05T08:57:38Z")

</div>

Thanks a lot for your detailed response.

Actually I'm using root for it, so I've set:

ulimit -n 64000

And then running "ulimit -Hn" returns:

[root@s1 ~]# ulimit -n 64000  
[root@s1 ~]# ulimit -Hn  
64000

Which I guess should be enough, right?

On Tue, Apr 5, 2011 at 10:46 AM, Joaquin Cuenca Abela \<  
[joaquin@cuencaabela.com](mailto:joaquin@cuencaabela.com)\> wrote:

> Hi,
> 
> raise the no\_files of the user running elasticsearch, this is done  
> typically adding to /etc/security/limits.conf the lines:
> 
> elasticsearch soft nofile 64000  
> elasticsearch hard nofile 64000
> 
> test that it gets applied running:
> 
> sudo -u elasticsearch -s "ulimit -Hn"
> 
> If it doesn't get applied run:
> 
> egrep -r pam\_limits /etc/pam.d/
> 
> and check that all pam\_limits.so are not commented out.
> 
> if sudo -u elasticsearch -s "ulimit -Hn" returns 64000, but you still  
> get the error on elasticsearch, you're probably running it through  
> another program that doesn't support pam, a usual offender is  
> supervisord. The only solution I know to this problem is to raise the  
> nofile limit for the user running supervisord, but this will obviously  
> raise the limit for all the processes running under supervisord, a non  
> ideal situation.
> 
> Hope it helps,
> 
> Cheers,
> 
> On Tue, Apr 5, 2011 at 10:35 AM, Enrique Medina Montenegro  
> [e.medina.m@gmail.com](mailto:e.medina.m@gmail.com) wrote:
> 
> > Hi,  
> > I know the error message is understandable, but I'd like to understand  
> > why  
> > and how to fix it. This is ES 0.16.0-SNAPSHOT (from master):  
> > [2011-04-05 00:43:54,320][DEBUG][action.bulk] [Magik]  
> > [cuestamenos][0]: Failed to execute bulk item (index) [index  
> > {[cuestamenos][producto][AVxe4QXAS6qm6Nx5GPPQUg], source[{"nombre":"ADVAN  
> > CE Torre PC Chrome 8001B Carcasas PC","descripcion":"La Advance Chrome  
> > 8001B  
> > es una torre PC Moyen Tour Â robusta y elegante. Esta torre 8001B de  
> > 480W...","linkProfundo":"[http://pdt.tradedoubler.com/cl](http://pdt.tradedoubler.com/cl)  
> > ick?a(1781229)p(15853)prod(802186777)ttid(5)url(http%3A%2F%  
> > [2Fwww.pixmania.com](http://2Fwww.pixmania.com)  
> > %2Fes%2Fes%2F8934880%2Fart%2Fadvance%2Ftorre-pc-chrome-8001b.html%3Fsrcid%3D348%26amp%3BPartenaire%3DTD%26amp%3BCodePromo%3Do  
> > ui)","imagen":"[http://pan.fotovista.com/dev/0/6/09668260/t\_09668260.jpg](http://pan.fotovista.com/dev/0/6/09668260/t_09668260.jpg)  
> > ","historico":1262,"cantidad":49.9,"moneda":"EUR","categorias1":["Electrónica","Hogar","Informática"],"categorias2":["Textil","Vide  
> > ojuegos","Programas","Electrodomésticos","Menaje","Fotografía y  
> > video","Ordenadores y componentes","Muebles","Decoración e  
> > iluminación","Imagen y  
> > sonido"],"categorias3":,"tienda":"Pixmania","marca":"A  
> > DVANCE","ean":"3700104417137","upc":"","isbn":""}]}]  
> > org.elasticsearch.index.engine.CreateFailedEngineException:  
> > [cuestamenos][0]  
> > Create failed for [producto#AVxe4QXAS6qm6Nx5GPPQUg]  
> > at
> 
> org.elasticsearch.index.engine.robin.RobinEngine.create(RobinEngine.java:245)
> 
> > at
> 
> org.elasticsearch.index.shard.service.InternalIndexShard.create(InternalIndexShard.java:276)
> 
> > at
> 
> org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:139)
> 
> > at
> 
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:418)
> 
> > at
> 
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.access$100(TransportShardReplicationOperationAction.java:233)
> 
> > at
> 
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:331)
> 
> > at
> 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 
> > at
> 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 
> > at java.lang.Thread.run(Thread.java:619)  
> > Caused by: java.io.FileNotFoundException:
> 
> /var/elasticsearch-0.16.0-SNAPSHOT/data/elasticsearch/nodes/0/indices/cuestamenos/0/index/\_f7.fdt
> 
> > (Too many open files)  
> > at java.io.RandomAccessFile.open(Native Method)  
> > at java.io.RandomAccessFile.(RandomAccessFile.java:212)  
> > at
> 
> org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexOutput.(SimpleFSDirectory.java:180)
> 
> > at
> 
> org.apache.lucene.store.NIOFSDirectory.createOutput(NIOFSDirectory.java:85)
> 
> > at
> 
> org.elasticsearch.index.store.support.AbstractStore$StoreDirectory.createOutput(AbstractStore.java:283)
> 
> > at
> 
> org.elasticsearch.index.store.support.AbstractStore$StoreDirectory.createOutput(AbstractStore.java:279)
> 
> > at org.apache.lucene.index.FieldsWriter.(FieldsWriter.java:65)  
> > at
> 
> org.apache.lucene.index.StoredFieldsWriter.initFieldsWriter(StoredFieldsWriter.java:66)
> 
> > at
> 
> org.apache.lucene.index.StoredFieldsWriter.finishDocument(StoredFieldsWriter.java:144)
> 
> > at
> 
> org.apache.lucene.index.StoredFieldsWriter$PerDoc.finish(StoredFieldsWriter.java:192)
> 
> > at
> 
> org.apache.lucene.index.DocumentsWriter$WaitQueue.writeDocument(DocumentsWriter.java:1559)
> 
> > at
> 
> org.apache.lucene.index.DocumentsWriter$WaitQueue.add(DocumentsWriter.java:1578)
> 
> > at
> 
> org.apache.lucene.index.DocumentsWriter.finishDocument(DocumentsWriter.java:1155)
> 
> > at
> 
> org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:832)
> 
> > at
> 
> org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:802)
> 
> > at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1998)  
> > at
> 
> org.elasticsearch.index.engine.robin.RobinEngine.innerCreate(RobinEngine.java:328)
> 
> > at
> 
> org.elasticsearch.index.engine.robin.RobinEngine.create(RobinEngine.java:238)
> 
> > ... 8 more  
> > Any clues?  
> > Salu2,  
> > Quique.
> 
> --  
> Joaquin Cuenca Abela -- [presspeople.com](http://presspeople.com): Fuentes de prensa y comunicados

---

<div class="post-metadata">

**Author:** ![Joaquin\_Cuenca\_Abela](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Joaquin\_Cuenca\_Abela](https://discuss.elastic.co/u/Joaquin_Cuenca_Abela)\
**Post date:** [April 5, 2011, 9:20am UTC](https://discuss.elastic.co/t/error-too-many-open-files/4189/4 "2011-04-05T09:20:25Z")

</div>

Nitpicking, to test your current limit try ulimit -Sn. -Hn gives you  
the hard limit, the limit that only root can change, -Sn gives you the  
current limit. The -Sn limit is what will be applied to the processes  
that you will start after the last change to the limits.

So assuming ulimit -Sn gives you 64000, you still have to restart  
elasticsearch to get the new limit. Also, if you restart your box you  
will lose the 64000 limit, if you want to keep it after restarts you  
have to put it in /etc/security/limits.conf.

Cheers,

On Tue, Apr 5, 2011 at 10:57 AM, Enrique Medina Montenegro  
[e.medina.m@gmail.com](mailto:e.medina.m@gmail.com) wrote:

> Thanks a lot for your detailed response.  
> Actually I'm using root for it, so I've set:  
> ulimit -n 64000  
> And then running "ulimit -Hn" returns:  
> [root@s1 ~]# ulimit -n 64000  
> [root@s1 ~]# ulimit -Hn  
> 64000  
> Which I guess should be enough, right?  
> On Tue, Apr 5, 2011 at 10:46 AM, Joaquin Cuenca Abela  
> [joaquin@cuencaabela.com](mailto:joaquin@cuencaabela.com) wrote:
> 
> > Hi,
> > 
> > raise the no\_files of the user running elasticsearch, this is done  
> > typically adding to /etc/security/limits.conf the lines:
> > 
> > elasticsearch soft nofile 64000  
> > elasticsearch hard nofile 64000
> > 
> > test that it gets applied running:
> > 
> > sudo -u elasticsearch -s "ulimit -Hn"
> > 
> > If it doesn't get applied run:
> > 
> > egrep -r pam\_limits /etc/pam.d/
> > 
> > and check that all pam\_limits.so are not commented out.
> > 
> > if sudo -u elasticsearch -s "ulimit -Hn" returns 64000, but you still  
> > get the error on elasticsearch, you're probably running it through  
> > another program that doesn't support pam, a usual offender is  
> > supervisord. The only solution I know to this problem is to raise the  
> > nofile limit for the user running supervisord, but this will obviously  
> > raise the limit for all the processes running under supervisord, a non  
> > ideal situation.
> > 
> > Hope it helps,
> > 
> > Cheers,
> > 
> > On Tue, Apr 5, 2011 at 10:35 AM, Enrique Medina Montenegro  
> > [e.medina.m@gmail.com](mailto:e.medina.m@gmail.com) wrote:
> > 
> > > Hi,  
> > > I know the error message is understandable, but I'd like to understand  
> > > why  
> > > and how to fix it. This is ES 0.16.0-SNAPSHOT (from master):  
> > > [2011-04-05 00:43:54,320][DEBUG][action.bulk] [Magik]  
> > > [cuestamenos][0]: Failed to execute bulk item (index) [index  
> > > {[cuestamenos][producto][AVxe4QXAS6qm6Nx5GPPQUg],  
> > > source[{"nombre":"ADVAN  
> > > CE Torre PC Chrome 8001B Carcasas PC","descripcion":"La Advance Chrome  
> > > 8001B  
> > > es una torre PC Moyen Tour Â robusta y elegante. Esta torre 8001B de  
> > > 480W...","linkProfundo":"[http://pdt.tradedoubler.com/cl](http://pdt.tradedoubler.com/cl)
> > > 
> > > ick?a(1781229)p(15853)prod(802186777)ttid(5)url(http%3A%2F%[2Fwww.pixmania.com](http://2Fwww.pixmania.com)%2Fes%2Fes%2F8934880%2Fart%2Fadvance%2Ftorre-pc-chrome-8001b.html%3Fsrcid%3D348%26amp%3BPartenaire%3DTD%26amp%3BCodePromo%3Do
> > > 
> > > ui)","imagen":"[Loading...](http://pan.fotovista.com/dev/0/6/09668260/t_09668260.jpg%22,%22historico%22:1262,%22cantidad%22:49.9,%22moneda%22:%22EUR%22,%22categorias1%22:%5B%22Electr%C3%B3nica%22,%22Hogar%22,%22Inform%C3%A1tica%22%5D,%22categorias2%22:%5B%22Textil%22,%22Vide)  
> > > ojuegos","Programas","Electrodomésticos","Menaje","Fotografía y  
> > > video","Ordenadores y componentes","Muebles","Decoración e  
> > > iluminación","Imagen y  
> > > sonido"],"categorias3":,"tienda":"Pixmania","marca":"A  
> > > DVANCE","ean":"3700104417137","upc":"","isbn":""}]}]  
> > > org.elasticsearch.index.engine.CreateFailedEngineException:  
> > > [cuestamenos][0]  
> > > Create failed for [producto#AVxe4QXAS6qm6Nx5GPPQUg]  
> > > at
> > > 
> > > org.elasticsearch.index.engine.robin.RobinEngine.create(RobinEngine.java:245)  
> > > at
> > > 
> > > org.elasticsearch.index.shard.service.InternalIndexShard.create(InternalIndexShard.java:276)  
> > > at
> > > 
> > > org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:139)  
> > > at
> > > 
> > > org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:418)  
> > > at
> > > 
> > > org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.access$100(TransportShardReplicationOperationAction.java:233)  
> > > at
> > > 
> > > org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:331)  
> > > at
> > > 
> > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
> > > at
> > > 
> > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
> > > at java.lang.Thread.run(Thread.java:619)  
> > > Caused by: java.io.FileNotFoundException:
> > > 
> > > /var/elasticsearch-0.16.0-SNAPSHOT/data/elasticsearch/nodes/0/indices/cuestamenos/0/index/\_f7.fdt  
> > > (Too many open files)  
> > > at java.io.RandomAccessFile.open(Native Method)  
> > > at java.io.RandomAccessFile.(RandomAccessFile.java:212)  
> > > at
> > > 
> > > org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexOutput.(SimpleFSDirectory.java:180)  
> > > at
> > > 
> > > org.apache.lucene.store.NIOFSDirectory.createOutput(NIOFSDirectory.java:85)  
> > > at
> > > 
> > > org.elasticsearch.index.store.support.AbstractStore$StoreDirectory.createOutput(AbstractStore.java:283)  
> > > at
> > > 
> > > org.elasticsearch.index.store.support.AbstractStore$StoreDirectory.createOutput(AbstractStore.java:279)  
> > > at org.apache.lucene.index.FieldsWriter.(FieldsWriter.java:65)  
> > > at
> > > 
> > > org.apache.lucene.index.StoredFieldsWriter.initFieldsWriter(StoredFieldsWriter.java:66)  
> > > at
> > > 
> > > org.apache.lucene.index.StoredFieldsWriter.finishDocument(StoredFieldsWriter.java:144)  
> > > at
> > > 
> > > org.apache.lucene.index.StoredFieldsWriter$PerDoc.finish(StoredFieldsWriter.java:192)  
> > > at
> > > 
> > > org.apache.lucene.index.DocumentsWriter$WaitQueue.writeDocument(DocumentsWriter.java:1559)  
> > > at
> > > 
> > > org.apache.lucene.index.DocumentsWriter$WaitQueue.add(DocumentsWriter.java:1578)  
> > > at
> > > 
> > > org.apache.lucene.index.DocumentsWriter.finishDocument(DocumentsWriter.java:1155)  
> > > at
> > > 
> > > org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:832)  
> > > at
> > > 
> > > org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:802)  
> > > at  
> > > org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1998)  
> > > at
> > > 
> > > org.elasticsearch.index.engine.robin.RobinEngine.innerCreate(RobinEngine.java:328)  
> > > at
> > > 
> > > org.elasticsearch.index.engine.robin.RobinEngine.create(RobinEngine.java:238)  
> > > ... 8 more  
> > > Any clues?  
> > > Salu2,  
> > > Quique.
> > 
> > --  
> > Joaquin Cuenca Abela -- [presspeople.com](http://presspeople.com): Fuentes de prensa y comunicados

--  
Joaquin Cuenca Abela -- [presspeople.com](http://presspeople.com): Fuentes de prensa y comunicados

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [April 5, 2011, 9:39am UTC](https://discuss.elastic.co/t/error-too-many-open-files/4189/5 "2011-04-05T09:39:08Z")

</div>

Hi Joaquin

> raise the no\_files of the user running elasticsearch, this is done  
> typically adding to /etc/security/limits.conf the lines:

Great explanation. Would you be prepared to change it into a tutorial?

If so, you can fork the github repo for [elasticsearch.org](http://elasticsearch.org) here:  
[https://github.com/elasticsearch/elasticsearch.github.com](https://github.com/elasticsearch/elasticsearch.github.com)

and once done, send a pull request.

many thanks

clint

--  
Web Announcements Limited is a company registered in England and Wales,  
with company number 05608868, with registered address at 10 Arvon Road,  
London, N5 1PR.

---

<div class="post-metadata">

**Author:** ![Joaquin\_Cuenca\_Abela](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Joaquin\_Cuenca\_Abela](https://discuss.elastic.co/u/Joaquin_Cuenca_Abela)\
**Post date:** [April 5, 2011, 10:12am UTC](https://discuss.elastic.co/t/error-too-many-open-files/4189/6 "2011-04-05T10:12:33Z")

</div>

On Tue, Apr 5, 2011 at 11:39 AM, Clinton Gormley  
[clinton@iannounce.co.uk](mailto:clinton@iannounce.co.uk) wrote:

> Hi Joaquin
> 
> > raise the no\_files of the user running elasticsearch, this is done  
> > typically adding to /etc/security/limits.conf the lines:
> 
> Great explanation. Would you be prepared to change it into a tutorial?
> 
> If so, you can fork the github repo for [elasticsearch.org](http://elasticsearch.org) here:  
> [https://github.com/elasticsearch/elasticsearch.github.com](https://github.com/elasticsearch/elasticsearch.github.com)
> 
> and once done, send a pull request.

sure, I'll do it asap

--  
Joaquin Cuenca Abela -- [presspeople.com](http://presspeople.com): Fuentes de prensa y comunicados

---

<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:08am UTC](https://discuss.elastic.co/t/error-too-many-open-files/4189/7 "2017-07-06T04:08:54Z")

</div>


