# Exception with index.store.type: memory

**URL:** https://discuss.elastic.co/t/exception-with-index-store-type-memory/5287
**Category:** Elasticsearch
**Created:** [August 31, 2011, 11:22am UTC](https://discuss.elastic.co/t/exception-with-index-store-type-memory/5287 "2011-08-31T11:22:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ridvan\_Gyundogan](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Ridvan\_Gyundogan](https://discuss.elastic.co/u/Ridvan_Gyundogan)
#### Post date: [August 31, 2011, 11:22am UTC](https://discuss.elastic.co/t/exception-with-index-store-type-memory/5287/1 "2011-08-31T11:22:25Z")

</div>

Hello,  
I run on a single local machine.  
This is the elasticsearch.yml:  
cluster.name: ridvansg  
index :  
store:  
type: memory

When I start I get the followin exception, probably I miss something  
in my configuration?

[2011-08-31 14:18:03,212][WARN][indices.cluster] [Jaren]  
[giftsplusindex][3] failed to start shard  
org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException:  
[giftsplusindex][3] shard allocated for local recovery (post api),  
should exists, but doesn't  
at  
org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:  
99)  
at org.elasticsearch.index.gateway.IndexShardGatewayService  
$1.run(IndexShardGatewayService.java:179)  
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:662)

Without the index.store.type: memory setting the ES 17.4 works fine.

---

<div class="post-metadata">

### Author: ![Ridvan\_Gyundogan](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Ridvan\_Gyundogan](https://discuss.elastic.co/u/Ridvan_Gyundogan)
#### Post date: [August 31, 2011, 11:33am UTC](https://discuss.elastic.co/t/exception-with-index-store-type-memory/5287/2 "2011-08-31T11:33:37Z")

</div>

Hm now I have this exception even after removing the  
"index.store.type: memory" setting.

This is how I did it:

1. load 600k small documents - worked fine at the end.
2. Add filter.cache(true) to each filter. - worked fine
3. add index.store.type: memory - exceptions in the elasticsearch log  
file.
4. remove index.store.type: memory - still exceptions in the  
elasticsearch log file. The ES doesn't start anymore.

On Aug 31, 2:22 pm, Ridvan Gyundogan [ridva...@gmail.com](mailto:ridva...@gmail.com) wrote:

> Hello,  
> I run on a single local machine.  
> This is the elasticsearch.yml:  
> cluster.name: ridvansg  
> index :  
> store:  
> type: memory
> 
> When I start I get the followin exception, probably I miss something  
> in my configuration?
> 
> [2011-08-31 14:18:03,212][WARN][indices.cluster] [Jaren]  
> [giftsplusindex][3] failed to start shard  
> org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException:  
> [giftsplusindex][3] shard allocated for local recovery (post api),  
> should exists, but doesn't  
> at  
> org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:  
> 99)  
> at org.elasticsearch.index.gateway.IndexShardGatewayService  
> $1.run(IndexShardGatewayService.java:179)  
> 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:662)
> 
> Without the index.store.type: memory setting the ES 17.4 works fine.

---

<div class="post-metadata">

### Author: ![Ridvan\_Gyundogan](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Ridvan\_Gyundogan](https://discuss.elastic.co/u/Ridvan_Gyundogan)
#### Post date: [August 31, 2011, 11:57am UTC](https://discuss.elastic.co/t/exception-with-index-store-type-memory/5287/3 "2011-08-31T11:57:53Z")

</div>

I forgot to mention that I restart ES by first kill'ing it. Probably  
not the best way?

On Aug 31, 2:33 pm, Ridvan Gyundogan [ridva...@gmail.com](mailto:ridva...@gmail.com) wrote:

> Hm now I have this exception even after removing the  
> "index.store.type: memory" setting.
> 
> This is how I did it:
> 
> 1. load 600k small documents - worked fine at the end.
> 2. Add filter.cache(true) to each filter. - worked fine
> 3. add index.store.type: memory - exceptions in the elasticsearch log  
> file.
> 4. remove index.store.type: memory - still exceptions in the  
> elasticsearch log file. The ES doesn't start anymore.
> 
> On Aug 31, 2:22 pm, Ridvan Gyundogan [ridva...@gmail.com](mailto:ridva...@gmail.com) wrote:
> 
> > Hello,  
> > I run on a single local machine.  
> > This is the elasticsearch.yml:  
> > cluster.name: ridvansg  
> > index :  
> > store:  
> > type: memory
> 
> > When I start I get the followin exception, probably I miss something  
> > in my configuration?
> 
> > [2011-08-31 14:18:03,212][WARN][indices.cluster] [Jaren]  
> > [giftsplusindex][3] failed to start shard  
> > org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException:  
> > [giftsplusindex][3] shard allocated for local recovery (post api),  
> > should exists, but doesn't  
> > at  
> > org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:  
> > 99)  
> > at org.elasticsearch.index.gateway.IndexShardGatewayService  
> > $1.run(IndexShardGatewayService.java:179)  
> > 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:662)
> 
> > Without the index.store.type: memory setting the ES 17.4 works fine.

---

<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: [August 31, 2011, 12:57pm UTC](https://discuss.elastic.co/t/exception-with-index-store-type-memory/5287/4 "2011-08-31T12:57:13Z")

</div>

If you use index.store.type set to memory (which has some problems in the  
implementation that I have not tracked yet), then using local gateway (the  
default) will not work. Once you create an index with settings, they are set  
to those settings, so if you kill elasticsearch and start it again (with  
local gateway), you will get failures. If you want a clean elasticsearch  
instance, delete teh data dir.

I suggest you use the file system based one, and if you want extra guice,  
use the mmapfs option.

On Wed, Aug 31, 2011 at 2:57 PM, Ridvan Gyundogan [ridvansg@gmail.com](mailto:ridvansg@gmail.com)wrote:

> I forgot to mention that I restart ES by first kill'ing it. Probably  
> not the best way?
> 
> On Aug 31, 2:33 pm, Ridvan Gyundogan [ridva...@gmail.com](mailto:ridva...@gmail.com) wrote:
> 
> > Hm now I have this exception even after removing the  
> > "index.store.type: memory" setting.
> > 
> > This is how I did it:
> > 
> > 1. load 600k small documents - worked fine at the end.
> > 2. Add filter.cache(true) to each filter. - worked fine
> > 3. add index.store.type: memory - exceptions in the elasticsearch log  
> > file.
> > 4. remove index.store.type: memory - still exceptions in the  
> > elasticsearch log file. The ES doesn't start anymore.
> > 
> > On Aug 31, 2:22 pm, Ridvan Gyundogan [ridva...@gmail.com](mailto:ridva...@gmail.com) wrote:
> > 
> > > Hello,  
> > > I run on a single local machine.  
> > > This is the elasticsearch.yml:  
> > > cluster.name: ridvansg  
> > > index :  
> > > store:  
> > > type: memory
> > 
> > > When I start I get the followin exception, probably I miss something  
> > > in my configuration?
> > 
> > > [2011-08-31 14:18:03,212][WARN][indices.cluster] [Jaren]  
> > > [giftsplusindex][3] failed to start shard  
> > > org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException:  
> > > [giftsplusindex][3] shard allocated for local recovery (post api),  
> > > should exists, but doesn't  
> > > at
> 
> org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:
> 
> > > 1. 
> > > 
> > > ```
> > > at org.elasticsearch.index.gateway.IndexShardGatewayService
> > > 
> > > ```
> > > 
> > > $1.run(IndexShardGatewayService.java:179)  
> > > 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:662)
> > 
> > > Without the index.store.type: memory setting the ES 17.4 works fine.

---

<div class="post-metadata">

### Author: ![Ridvan\_Gyundogan](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Ridvan\_Gyundogan](https://discuss.elastic.co/u/Ridvan_Gyundogan)
#### Post date: [August 31, 2011, 3:26pm UTC](https://discuss.elastic.co/t/exception-with-index-store-type-memory/5287/5 "2011-08-31T15:26:09Z")

</div>

I will try, thanks a lot!

On Aug 31, 3:57 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> If you use index.store.type set to memory (which has some problems in the  
> implementation that I have not tracked yet), then using local gateway (the  
> default) will not work. Once you create an index with settings, they are set  
> to those settings, so if you kill elasticsearch and start it again (with  
> local gateway), you will get failures. If you want a clean elasticsearch  
> instance, delete teh data dir.
> 
> I suggest you use the file system based one, and if you want extra guice,  
> use the mmapfs option.
> 
> On Wed, Aug 31, 2011 at 2:57 PM, Ridvan Gyundogan [ridva...@gmail.com](mailto:ridva...@gmail.com)wrote:
> 
> > I forgot to mention that I restart ES by first kill'ing it. Probably  
> > not the best way?
> 
> > On Aug 31, 2:33 pm, Ridvan Gyundogan [ridva...@gmail.com](mailto:ridva...@gmail.com) wrote:
> > 
> > > Hm now I have this exception even after removing the  
> > > "index.store.type: memory" setting.
> 
> > > This is how I did it:
> > > 
> > > 1. load 600k small documents - worked fine at the end.
> > > 2. Add filter.cache(true) to each filter. - worked fine
> > > 3. add index.store.type: memory - exceptions in the elasticsearch log  
> > > file.
> > > 4. remove index.store.type: memory - still exceptions in the  
> > > elasticsearch log file. The ES doesn't start anymore.
> 
> > > On Aug 31, 2:22 pm, Ridvan Gyundogan [ridva...@gmail.com](mailto:ridva...@gmail.com) wrote:
> 
> > > > Hello,  
> > > > I run on a single local machine.  
> > > > This is the elasticsearch.yml:  
> > > > cluster.name: ridvansg  
> > > > index :  
> > > > store:  
> > > > type: memory
> 
> > > > When I start I get the followin exception, probably I miss something  
> > > > in my configuration?
> 
> > > > [2011-08-31 14:18:03,212][WARN][indices.cluster] [Jaren]  
> > > > [giftsplusindex][3] failed to start shard  
> > > > org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException:  
> > > > [giftsplusindex][3] shard allocated for local recovery (post api),  
> > > > should exists, but doesn't  
> > > > at
> 
> > org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:
> > 
> > > > 1. 
> > > > 
> > > > ```
> > > > at org.elasticsearch.index.gateway.IndexShardGatewayService
> > > > 
> > > > ```
> > > > 
> > > > $1.run(IndexShardGatewayService.java:179)  
> > > > 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:662)
> 
> > > > Without the index.store.type: memory setting the ES 17.4 works fine.

---

<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:55am UTC](https://discuss.elastic.co/t/exception-with-index-store-type-memory/5287/6 "2017-07-06T03:55:25Z")

</div>


