# Indexing stops after 1000 records

**URL:** <https://discuss.elastic.co/t/indexing-stops-after-1000-records/50341>\
**Category:** Logstash\
**Created:** [May 18, 2016, 2:01pm UTC](https://discuss.elastic.co/t/indexing-stops-after-1000-records/50341 "2016-05-18T14:01:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanju1323](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@sanju1323](https://discuss.elastic.co/u/sanju1323)\
**Post date:** [May 18, 2016, 2:01pm UTC](https://discuss.elastic.co/t/indexing-stops-after-1000-records/50341/1 "2016-05-18T14:01:34Z")

</div>

I'm trying to reindex using logstash. I have total 25000 recodrs that are to be indexed. Whenever I run the following logstash file, it stops at 1000 records. Is there anything that I have to change in the following logstash file???

input  
{  
elasticsearch  
{  
host =\> ["localhost"]  
index =\> "sample"  
#size =\> 100  
}  
}

filter  
{  
mutate  
{  
gsub =\> ["Summary","Mr.(\w)\w\* (\w)\w\*","\*\*\*"]  
}  
}

output  
{  
elasticsearch\_http  
{  
host =\> "localhost"  
index =\> "sample"  
index\_type =\> "sample"  
}  
stdout  
{  
codec =\> "json"  
}  
}

Have tried giving size. If I use size, it stops at 5000 records. If increase the size further, the following error is coming up

Plugin: \<LogStash::Inputs::Elasticsearch host=\>"localhost", index=\>"sample", query=\>"\*", scroll=\>"1m"\>  
Error: Java heap space {:level=\>:error}←[0m

Don't know what to do. Because of this, I am not able to move further.

---

<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:57am UTC](https://discuss.elastic.co/t/indexing-stops-after-1000-records/50341/2 "2017-07-06T04:57:09Z")

</div>


