0

I'm using an external mongodb (mongolab) for my meteor app and its inserts are really really slow. Like 3-4 inserts per second. but when I insert directly using the shell it speeds up to 600 - 1000. I even did a very simple meteor app that just loops:

    Stats.insert({
      Test : "test",
    })

Any ideas what's wrong? I'm using the shared cluster plan.

  • Are you using [oplog tailing](https://github.com/meteor/meteor/wiki/Oplog-Observe-Driver)? If you didn't have that enabled and the server was polling, that could explain the delay. Have a look at [this](http://blog.mongolab.com/2014/07/tutorial-scaling-meteor-with-mongodb-oplog-tailing/) and [this](http://docs.mongolab.com/oplog/). – David Weldon Dec 13 '14 at 15:37
  • do you have any reactive template depending on `Stats`? If so, then the slowdown comes from the repeated reevaluation of the query as you insert. Look at this answer to stop that: http://stackoverflow.com/questions/12298640/meteors-subscription-and-sync-are-slow/19599027#19599027. – Christian Fritz Dec 13 '14 at 20:54

0 Answers0