profile: warning ns local.system.profile does not exist

589 views
Skip to first unread message

ZephW

unread,
Nov 6, 2011, 11:05:57 PM11/6/11
to mongod...@googlegroups.com
I used setProfilingLevel(1, 100) to enable profile, but mongod complains:
profile: warning ns local.system.profile does not exist

I tried to set profiling level back to 0 then to 1 again, but the missing local.system.profile collection was not re-created.
How can I fix this?

Scott Hernandez

unread,
Nov 6, 2011, 11:20:19 PM11/6/11
to mongod...@googlegroups.com
Can you please post the mongo javascript shell session from start to
finish when you connect and run those commands?

Something like these commands would help:
>db
>db.serverStatus()
>db.getProfilingStatus()
>db.setProfilingLeve(1, 100)
>db.system.profile.stats()

You can manually create the system.profile capped collection if you
wish, then enable it.
http://www.mongodb.org/display/DOCS/Database+Profiler

> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/mongodb-user/-/VG56SM9IyasJ.
> 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.
>

ZephW

unread,
Nov 7, 2011, 1:35:50 AM11/7/11
to mongod...@googlegroups.com
Here are the whole shell session:
PRIMARY> use comitium
switched to db comitium
PRIMARY> db
comitium
PRIMARY> db.serverStatus()
{
"host" : "dd01:11001",
"version" : "2.0.1",
"process" : "mongod",
"uptime" : 18110,
"uptimeEstimate" : 17769,
"localTime" : ISODate("2011-11-07T06:33:21.100Z"),
"globalLock" : {
"totalTime" : 18110067170,
"lockTime" : 104441957,
"ratio" : 0.005767066241091142,
"currentQueue" : {
"total" : 0,
"readers" : 0,
"writers" : 0
},
"activeClients" : {
"total" : 2,
"readers" : 2,
"writers" : 0
}
},
"mem" : {
"bits" : 64,
"resident" : 417,
"virtual" : 117934,
"supported" : true,
"mapped" : 57637,
"mappedWithJournal" : 115274
},
"connections" : {
"current" : 1787,
"available" : 18213
},
"extra_info" : {
"note" : "fields vary by platform",
"heap_usage_bytes" : 8397088,
"page_faults" : 4
},
"indexCounters" : {
"btree" : {
"accesses" : 27344,
"hits" : 27312,
"misses" : 0,
"resets" : 0,
"missRatio" : 0
}
},
"backgroundFlushing" : {
"flushes" : 301,
"total_ms" : 1481,
"average_ms" : 4.920265780730897,
"last_ms" : 1,
"last_finished" : ISODate("2011-11-07T06:32:31.102Z")
},
"cursors" : {
"totalOpen" : 2,
"clientCursors_size" : 2,
"timedOut" : 30,
"pinned" : 1
},
"network" : {
"bytesIn" : 3439643548,
"bytesOut" : 13186576597,
"numRequests" : 27539550
},
"repl" : {
"setName" : "shard_1",
"ismaster" : true,
"secondary" : false,
"hosts" : [
"dd01:11001",
"dd03:11001",
"dd02:11001"
],
"primary" : "dd01:11001",
"me" : "dd01:11001"
},
"opcounters" : {
"insert" : 300,
"query" : 4472644,
"update" : 216030,
"delete" : 0,
"getmore" : 199341,
"command" : 22651199
},
"asserts" : {
"regular" : 0,
"warning" : 7798186,
"msg" : 0,
"user" : 36,
"rollovers" : 0
},
"writeBacksQueued" : false,
"dur" : {
"commits" : 30,
"journaledMB" : 0,
"writeToDataFilesMB" : 0,
"compression" : 0,
"commitsInWriteLock" : 0,
"earlyCommits" : 0,
"timeMs" : {
"dt" : 3073,
"prepLogBuffer" : 0,
"writeToJournal" : 0,
"writeToDataFiles" : 0,
"remapPrivateView" : 0
}
},
"ok" : 1
}
PRIMARY> db.getProfilingLevel()
1
PRIMARY> db.setProfilingLevel(1, 100)
{ "was" : 1, "slowms" : 100, "ok" : 1 }
PRIMARY> db.system.profile.stats()
{
"ns" : "comitium.system.profile",
"count" : 4386,
"size" : 982112,
"avgObjSize" : 223.91974464204287,
"storageSize" : 1052672,
"numExtents" : 1,
"nindexes" : 0,
"lastExtentSize" : 1052672,
"paddingFactor" : 1,
"flags" : 0,
"totalIndexSize" : 0,
"indexSizes" : {
},
"capped" : 1,
"max" : 2147483647,
"ok" : 1
}
PRIMARY> 

while in the log we still see "14:33:56 [conn5] profile: warning ns local.system.profile does not exist"

Scott Hernandez

unread,
Nov 7, 2011, 9:06:50 AM11/7/11
to mongod...@googlegroups.com
Is that time in the log related to those operations? It seems like
those operations worked just fine and profiling is enabled, and
working.

> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/mongodb-user/-/kbDs_v56FloJ.

ZephW

unread,
Nov 8, 2011, 4:53:16 AM11/8/11
to mongod...@googlegroups.com
Scott,
The logs are captured right after I ran the currentOP command.

Scott Hernandez

unread,
Nov 8, 2011, 1:49:34 PM11/8/11
to mongod...@googlegroups.com
I don't see db.currentOp() anywhere in that output. Was that at the
end of the those commands?

On Tue, Nov 8, 2011 at 4:53 AM, ZephW <dongw.p...@gmail.com> wrote:
> Scott,
> The logs are captured right after I ran the currentOP command.
>

> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/mongodb-user/-/orzps45S_mwJ.

Jose Casillas

unread,
Nov 14, 2011, 3:59:05 PM11/14/11
to mongodb-user
I can confirm I've also experienced this bug with 2.0.0 and 2.0.1.

If I enable profiling with level 1, the system.profiling collection
does not automatically get created and I get this warning in the log.
If I simply set profiling level to 2, the collection gets created and
it works fine. At that point I can set it back to level 1 and it
continues to work normally.

On Nov 8, 10:49 am, Scott Hernandez <scotthernan...@gmail.com> wrote:
> I don't see db.currentOp() anywhere in that output. Was that at the
> end of the those commands?
>

Scott Hernandez

unread,
Nov 14, 2011, 4:35:06 PM11/14/11
to mongod...@googlegroups.com
Can you create a jira issue (http://jira.mongodb.org) with the repro
steps please? I have not see this.

ZephW

unread,
Nov 15, 2011, 5:14:08 AM11/15/11
to mongod...@googlegroups.com
Thanks for sharing the workaround.

Reid Morrison

unread,
Sep 5, 2012, 8:37:15 PM9/5/12
to mongod...@googlegroups.com
Jose, Thank you for the workaround. This problem still exists in "version" : "2.0.6".

On Tuesday, November 15, 2011 5:14:08 AM UTC-5, ZephW wrote:
Thanks for sharing the workaround.

Gianfranco

unread,
Sep 14, 2012, 7:34:29 AM9/14/12
to mongod...@googlegroups.com
Unfortunately this issue hasn't been fixed yet. There is Jira issue, and it's scheduled to be fixed in 2.3.x

For the moment please use db.setProfilingLevel() command, which will create the system.profile collection inside the current db.

Lastly. Please create another Topic in Google group if you any more information. Old topics should be opened again.

Thanks
Reply all
Reply to author
Forward
0 new messages