bulk insert error

41 views
Skip to first unread message

Kabir Idris

unread,
Oct 9, 2015, 6:12:49 PM10/9/15
to ReactiveMongo - http://reactivemongo.org
Hi All, Im have an issue with reactivemongo

Im using ubuntu 15.04 OS with play2.4 and reactivemongo plug-in 0.11.7

whenever I try to do a bulk insert operation somethings i get an error like this

[error] - reactivemongo.core.actors.MongoDBSystem - The entire node set is unreachable, is there a network problem?

while MOST times ONLY a few of the records are actually inserted into the mongodb.

have anyone experienced such? 

Thanks. 

Kabir Idris

unread,
Oct 12, 2015, 8:48:35 AM10/12/15
to ReactiveMongo - http://reactivemongo.org
any help?

Cédric Chantepie

unread,
Oct 12, 2015, 9:39:58 AM10/12/15
to ReactiveMongo - http://reactivemongo.org
Can you share a reproducer?

olaf.v...@petrolink.com

unread,
Feb 26, 2016, 4:24:24 AM2/26/16
to ReactiveMongo - http://reactivemongo.org
Hi, I am having the same problem and this is my code:



val en = Enumerator.enumerate(insertCollection)
val db = connect()
val zmaps:BSONCollection = db("zmap2")
val bInsert = insertCollection.map(implicitly[zmaps.ImplicitlyDocumentProducer](_))
val bulkResult1: Future[MultiBulkWriteResult] = zmaps.bulkInsert(ordered = false)( bInsert: _*)
while(!bulkResult1.isCompleted){
  Thread.sleep(1)
}
insertCollection.clear()


I do bulk inserts by 100.000 records at the same time. I need to insert millions of documents(just once) the driver and it takes some time because I am benchmarking on a 'bad machine' . So I want to do it sychronized for a test, hence the Sleep(1). If I dont do this Java just eats my memory with many started threads.

But I also get the [The entire node set is unreachable, is there a network problem?] issue.

Using 0.11


Op maandag 12 oktober 2015 15:39:58 UTC+2 schreef Cédric Chantepie:

olaf.v...@petrolink.com

unread,
Feb 26, 2016, 4:26:53 AM2/26/16
to ReactiveMongo - http://reactivemongo.org
I updated to 0.11 btw, bulk insert did work 0.10 but with different code (Required an Enumarator)

Op vrijdag 26 februari 2016 10:24:24 UTC+1 schreef olaf.v...@petrolink.com:

Cédric Chantepie

unread,
Feb 26, 2016, 4:46:26 AM2/26/16
to ReactiveMongo - http://reactivemongo.org
Please make sure you use the latest 0.11.10 .
Reply all
Reply to author
Forward
0 new messages