# Infinite loop when loading data from mongodb to logstash

**URL:** <https://discuss.elastic.co/t/infinite-loop-when-loading-data-from-mongodb-to-logstash/128561>\
**Category:** Logstash\
**Created:** [April 18, 2018, 3:03pm UTC](https://discuss.elastic.co/t/infinite-loop-when-loading-data-from-mongodb-to-logstash/128561 "2018-04-18T15:03:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rihab](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rihab](https://discuss.elastic.co/u/rihab)\
**Post date:** [April 18, 2018, 3:03pm UTC](https://discuss.elastic.co/t/infinite-loop-when-loading-data-from-mongodb-to-logstash/128561/1 "2018-04-18T15:03:54Z")

</div>

Hello,  
I try to load data from mongodb to logstash but I have Infinite loop.  
I use logstash 1.5.4 and mongo db 3.5.1.

My logstash configuration :

input {  
mongodb {  
uri =\> "mongodb://127.0.0.1:27017/logtest"  
collection =\> "products"  
placeholder\_db\_dir =\> 'c:/elk2/'  
placeholder\_db\_name =\> 'logstash\_sqlite.db'  
batch\_size =\> 1  
}  
}

output {  
stdout { codec =\> rubydebug }  
file {  
path =\> "C:\elk\out.log"  
}  
}

This is the out put. it's an infinite loop and the data is not loaded.

D, [2018-04-18T16:41:29.295000 #9192] DEBUG -- : MONGODB | 127.0.0.1:27017 | log  
test.find | SUCCEEDED | 0.007s  
D, [2018-04-18T16:41:29.338000 #9192] DEBUG -- : MONGODB | 127.0.0.1:27017 | log  
test.listCollections | STARTED | {"listCollections"=\>1, "cursor"=\>{}, "filter"=\>  
{"name"=\>{"$not"=\>/system.|$/}}}  
D, [2018-04-18T16:41:29.347000 #9192] DEBUG -- : MONGODB | 127.0.0.1:27017 | log  
test.listCollections | SUCCEEDED | 0.006s

cordial regards

---

<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:** [May 16, 2018, 3:03pm UTC](https://discuss.elastic.co/t/infinite-loop-when-loading-data-from-mongodb-to-logstash/128561/2 "2018-05-16T15:03:55Z")

</div>

Closed on May 16, 2018, 3:03pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
