2
  • I have an app which does regular (every 2 minutes) bulk inserts to two identical instances of 2.6.4 mongodb on two servers. Both the instances are hosted on 2 Core, 14GB machine and have only one collection with 6 million documents with 7 GB of total index size. There's a text index and a TTL index along with 2 other sparse indices. Journaling is off on both instances.

  • I have noticed a strange behaviour with bulk inserts. Sometimes, the bulk inserts (20K new documents) happens in less than 10 seconds. When this happens, the entries in the log files having following pattern:

2

2014-09-12T22:06:38.656+0000 [conn57] command day_raw_tweet_db.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:9 reslen:40 309ms
2014-09-12T22:06:38.984+0000 [conn57] command day_raw_tweet_db.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:8 reslen:40 269ms
2014-09-12T22:06:39.452+0000 [conn57] command day_raw_tweet_db.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:11 reslen:40 398ms
2014-09-12T22:06:39.922+0000 [conn57] command day_raw_tweet_db.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:9 reslen:40 394ms
2014-09-12T22:06:40.377+0000 [conn57] command day_raw_tweet_db.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:10 reslen:40 389ms
2014-09-12T22:06:40.834+0000 [conn57] command day_raw_tweet_db.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:8 reslen:40 375ms
2014-09-12T22:06:41.299+0000 [conn57] command day_raw_tweet_db.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:8 reslen:40 394ms
2014-09-12T22:06:41.438+0000 [conn57] command day_raw_tweet_db.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:8 reslen:40 112ms
  • As mentioned when log entries are as above the inserts are super fast.
  • However, in a different scenario (and this happens automatically without any significant change in payload on either instances) the log entries show each document getting inserted

    2014-09-12T22:11:29.450+0000 [conn156] insert week_raw_tweet_db.tweets query: { _id: "510498671730110464" ...

  • In this case the inserts are super slow.

  • The worst part is that this switching between both these modes (fast vs. slow) happens automatically and quite intermittently for no apparent change in workload on mongo instance.

I need urgent help on this issue.

I've tried to direct some instructors of official mongodb courses to this thread. Hope they or anyone else has an explanation and some mechanism to solve this problem.

  • As Asya mentioned in the other posted question on this topic, this is not a simple Q&A type of problem and requires detailed troubleshooting to be anything besides guess work. Please post your question in the mongodb-user google group but be aware that this type of issue will not usually be solved straight away and will require significant information gathering, some of which Asya mentioned already – Adam C Sep 13 '14 at 1:10
  • 1
    Adam I've been working with MongoDB for over 1.5 years. We use is heavily @frrole and I'm very keen on resolving this issue with active participation of Mongo community. Will surely post this on mongodb-user group and let you know. – VaidAbhishek Sep 13 '14 at 6:07
  • am i missing something here day_raw_tweet_db and week_raw_tweet_db are not different databases? – Antonios Sep 15 '14 at 7:18
  • It wouldn't hurt to solve the question here, either. But I would like to see the second query in full. – Markus W Mahlberg Sep 15 '14 at 8:36
  • @Antonis Yes, they are different dbs on different machines. Ideally both the names should be equal but they are not. Other than that they both have a single collection of tweets to which I'm doing bulk inserts. So you can treat both of them (week_raw .. and day_raw ... ) as similar in all aspects. – VaidAbhishek Sep 15 '14 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.