MongoDB wait but have most update to do

20 views
Skip to first unread message

Alexandre Russo

unread,
Apr 19, 2016, 8:58:37 AM4/19/16
to mongodb-user
Hey guys !

I have 3.000.000 jobs in Job Queue (Gearman).

Each job make 3 updates in my mongoDB. I have 1200 Jobs in same time permanently.

But, sometime, with mongostats i see that mongodb waiting... ?

0 insert, 0 update, 0 delete, 0 query i don't know why, someone can explain me why mongodb waiting ?

thank you !

Ankur Raina

unread,
May 8, 2016, 11:48:13 PM5/8/16
to mongodb-user

Hi Alexandre,

It is quite possible that none of your jobs is doing any database operation at that particular time when you are seeing 0 operations in mongostat results. They may be waiting for some resource or event for further processing.

Moreover, mongostat output provides the count of database operations such as insert, query, update, etc. and by default runs every one second. This may not reflect all the statistics such as lock queues, cursors, connections and storage engine level metrics. db.serverStatus() should be a better way of checking all statistics. You can use a small script to run the command repeatedly and see the results. mongod logs can also help in identifying the queries running at the time. For additional monitoring, please also read Monitoring for MongoDB.

If you still doubt that the mongodb server is waiting and not performing the operations, please also consider providing below details for better community help:

  • Version of MongoDB that you are using.
  • Storage engine that you are using
  • Deployment topology (Standalone/Replica Set/Sharded cluster)
  • What operations are the jobs performing on the database and their schedule?
  • Output of mongostat, serverStatus and mongod logs during this time.

Regards
Ankur

Reply all
Reply to author
Forward
0 new messages