db.currentOp() showing query ops with no ns or parameters

353 views
Skip to first unread message

Allen

unread,
Oct 11, 2011, 3:49:54 PM10/11/11
to mongodb-user
I've noticed a few of these whenever I run db.currentOp() on any of my
shard mongod processes (v2.0.0):

{
"opid" : 2762282,
"active" : false,
"waitingForLock" : false,
"op" : "query",
"ns" : "",
"query" : {

},
"client" : "jbeta:44173",
"desc" : "conn",
"threadId" : "0x7f20b19f5710",
"connectionId" : 465,
"numYields" : 0
}

They don't seem to be problematic, but I'm curious: what are these
query ops with empty ns and query params?

Chris Westin

unread,
Oct 11, 2011, 6:19:35 PM10/11/11
to mongodb-user
For the "query" field, empty braces indicate a collection scan. This
field is what you specified inside db.foo.find(...); For "ns" to be
empty is a little more mysterious and may require some digging -- I
haven't seen anything like that before. Can you track down any
collection scans in your application and tell us what they're on so we
can tell if there is something unusual going on?

Allen

unread,
Oct 11, 2011, 11:37:13 PM10/11/11
to mongodb-user
Chris,

I don't know how it could be a collection scan, as all of my queries
use indexes. Furthermore, my mongod processes are running with --
notablescan. Anything else I should look into?

-Allen

Eliot Horowitz

unread,
Oct 12, 2011, 1:03:09 AM10/12/11
to mongod...@googlegroups.com
Note that's inactive.
Did you do db.currentOp(true) or just db.currentOp()?
Inactive queries may be missing some fields.

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

Allen

unread,
Oct 12, 2011, 2:00:05 AM10/12/11
to mongodb-user
Just db.currentOp()
Reply all
Reply to author
Forward
0 new messages