PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 4th of February, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[02:19:32] <OliverJAsh> hey guys, where might the default mongo configuration file be installed on centos?
[02:19:48] <OliverJAsh> it's not /etc/mongodb.conf
[02:19:52] <OliverJAsh> i'm looking for the dbpath
[02:20:25] <resting> is the size returned by .stats() in bytes?
[06:03:10] <resting> what does working set mean? if i write continuously a document with 2000 entries/sec for days…does the working set increase as time goes on?
[06:54:29] <jY> resting: no
[06:59:19] <resting> jY: i see…i'm having problem with my test, which fails with buffer overflow after about 4 days. any idea what could be the cause?
[07:08:39] <jY> resting: well buffer overflow wouldn't be a cause of using too much memory
[07:08:46] <jY> what version of mongo?
[07:10:28] <resting> jY: 1.6.3...
[07:10:44] <jY> why?
[07:10:45] <jY> heh
[07:12:08] <resting> jY: hm…i guess installed simply by doing apt-get install and not through the mongo10gen repo…but i'd since upgraded though...
[07:13:08] <jY> i wouldn't use 1.6 if you paid me
[07:17:40] <resting> jY: yeah..didn't realise what i was missing till i look deeper…hm..that said, i'm not sure if i should run my test again simply because i upgraded…it will cost another 4 days of waiting...
[07:22:06] <jY> resting: generally mongo should just use the same memory/disk location
[07:22:13] <jY> it might be a bug they have long since fixed though
[07:24:53] <resting> jY: possibly…i hope it'll work too...
[07:44:43] <resting> any idea if the command numactl --interleave=all /usr/bin/local/mongod is a one time command, or do i have to add it to a startup script that runs everytime on boot?
[07:58:25] <resting> hm..now i can't start mongo..
[07:58:29] <resting> start-stop-daemon: unrecognized option '--interleave=all'
[07:58:40] <resting> any idea?
[08:17:21] <vr_> I have a db w/ roughly 500K documents. I'd like to find the top N in a field where there is no index.
[08:17:40] <vr_> Doing the sort/limit in mongo takes *much* longer than I'd expect (killed the query after 10 minutes)
[08:39:08] <[AD]Turbo> hola
[11:24:39] <jd823592> Hello i have added a user to my admin db and then i restarted with --auth but i still can manipulate the admin db without ever providing the auth credentials
[11:28:17] <jd823592> isnt that weird?
[11:29:49] <jd823592> never mind i probably get it
[11:32:30] <jd823592> the error is thrown not on use db which makes sense :)
[12:20:57] <xcat> I am trying to set up a replicate set
[12:21:19] <xcat> But when I add the slave with rs.add() I get: exception: member x.x.x.x:27017 has a config version >= to the new cfg version; cannot change config
[12:21:26] <xcat> What the hell does that even mean? Even Google doesn't know
[12:53:02] <xcat> How can I reconfigure the hostname if Mongo misdetects it?
[15:27:05] <saml> how can I query for documents that has {"foo": "bar"} and exists key called "XXX" ?
[15:28:51] <alexwaters> how can I query for a document containing a nested dict (and search through that dict.) for example: {u'_id': ObjectId('510c9b9d51a63b145b9efa9b'), u'call': {u'status': u'COMPLETED', u'transid': u'12345', u'result': u'1'}}
[15:29:23] <saml> alexwaters, what do you want to find?
[15:29:29] <alexwaters> i want to be able to do somethin like find({'call':{contains transid:12345
[15:29:37] <alexwaters> s/somethin/something
[15:29:48] <saml> $elemMatch ?
[15:29:59] <tylerjohnst> db.appointments.find({"state": "foo"}); db.appointments.update({"state": "foo"}, {"$set": { "state": "bar"}})
[15:30:12] <tylerjohnst> the first query works, the second one is failing, is there a syntax error anywhere? i can't figure out why it isn't working
[15:30:35] <saml> find({ call: { $elemMatch: { transid: 12345 }}})
[15:30:39] <alexwaters> oh snap i thought that only works with lists. thank you!
[15:30:57] <saml> i don't know. i didn't try it
[15:31:03] <saml> this is second day using mongodb
[15:31:07] <saml> i can mislead you
[15:34:59] <tylerjohnst> anyone have any ideas?
[15:38:45] <arnpro> tylerjohnst: I am no expert, but what error are you getting?
[15:39:37] <tylerjohnst> i'm not getting an error, the update seems to be silently failing
[15:39:46] <tylerjohnst> because i run the same find again and it returns the same results
[15:39:52] <tylerjohnst> even though i'm modifying the state attribute
[15:44:01] <arnpro> tylerjohnst: it seems to work just fine, tried it on 2.2.2 shell
[15:44:17] <tylerjohnst> yeah i'm also on 2.2.2
[16:00:10] <NodeX> tylerjohnst : are you expecting it to update more than 1 document?
[16:00:15] <tylerjohnst> yeah
[16:00:25] <NodeX> add "false,true" to the end
[16:00:34] <NodeX> db.appointments.update({"state": "foo"}, {"$set": { "state": "bar"}},false,true)
[16:00:52] <NodeX> the false is for "upsert" and the "true" is for "update multiple"
[16:04:02] <kali> NodeX: have you seen the new syntax btw ? { multi: true } as an "option" in place of the the two last arguments...
[16:04:21] <kali> NodeX: the shell maintains compatibility with the previous aberation
[16:06:58] <NodeX> not seen it sorry
[16:07:48] <kali> NodeX: it's much easier to explain than the false,true crap :)
[16:08:33] <NodeX> cool
[16:09:21] <tylerjohnst> ahhh thanks NodeX
[16:09:44] <NodeX> ;)
[16:10:04] <NodeX> apparently you can use an object now instead of false,true
[16:10:17] <NodeX> just do db.appointments.update({"state": "foo"}, {"$set": { "state": "bar"}},{multi:true})
[16:11:04] <NodeX> and an fyi, you dont have to quote keys unless they break a string literal.
[16:47:28] <chiel> hi guys, trying to set up mongodb on debian squeeze, what's the recommended way to run this?
[16:47:36] <chiel> i'd like it to be system-wide, ideally
[16:48:27] <aboudreault> ?
[16:48:27] <rawles> aptitude update; aptitude install mongodb
[16:48:55] <rawles> for other options: aptitude search mongodb
[16:49:21] <jtomasrl> i just installed mongo en debian squeeze but im getting this
[16:49:43] <jtomasrl> locale: Cannot set LC_CTYPE to default locale: No such file or directory
[16:49:44] <jtomasrl> same with LC_ALL = (unset)
[16:49:59] <aboudreault> that's not related to mongodb
[16:50:03] <aboudreault> set your locales
[16:53:42] <chiel> rawles: hm, thought the recommendation was to just use the binary found on the website?
[16:54:00] <chiel> jtomasrl: dpkg-reconfigure locales
[16:54:49] <rawles> well, mongodb in the repository will be older, mine is 2.0.4 i think
[16:54:55] <rawles> depends what you need
[16:54:59] <rawles> i find packages easier
[16:55:24] <chiel> yea, fair enough :)
[16:56:46] <chiel> only 1.1 from apt
[16:56:48] <chiel> :DD
[16:57:00] <chiel> guess I can install the squeeze backport though
[16:57:03] <chiel> that's 2.0
[16:57:07] <jtomasrl> chiel: thanks
[16:57:09] <NodeX> err use the 10gen repo
[16:57:14] <NodeX> it's always up to date
[16:57:15] <kali> there is also a set of 10gen official packages
[16:57:27] <chiel> hm
[16:58:35] <chiel> alright i'll give that a go then
[17:01:20] <chiel> cool, appears to work a charm
[17:08:50] <link15> hey all, i'm having trouble with an old version of pymongo that i can not update
[17:09:20] <link15> i'm getting max_pool_size=1 on Connection gives me unknown keyword arg max_pool_size
[17:09:28] <link15> then if i don't set it i get AutoReconnect can't find master
[17:09:44] <link15> i'm guessing since the max pool size is not 1 it assumes there are slaves/masters going down
[17:09:48] <link15> but there arent so it freaks out
[17:09:54] <link15> ?
[17:09:58] <link15> is this partially correct?
[17:10:10] <link15> this is legacy code on maitenence mode
[17:10:46] <jY> what version of pymongo?
[17:11:12] <Killerguy> using pymongo
[17:11:28] <Killerguy> how can I know is db.authenticate went ok?
[17:11:32] <Killerguy> if*
[17:12:08] <jY> Killerguy: it won't throw an exception
[17:12:11] <link15> is there a version command?
[17:12:34] <jY> link15: yes
[17:12:35] <jY> >>> import pymongo
[17:12:35] <jY> >>> pymongo.version
[17:12:35] <jY> '2.1'
[17:12:53] <vlad-paiu> Hello
[17:12:53] <link15> 1.7
[17:13:55] <link15> i looked at the 1.7 docs and max_pool_size should be a valid keyword arg to Connection for that version
[17:14:01] <link15> i'm running this in a python2.6 env
[17:14:02] <anaio> is nesting and/or where-clauses discouraged?
[17:14:18] <jY> link15: so the error is pretty obvious
[17:14:23] <jY> max_pool_size wasn't in 1.7
[17:14:32] <Killerguy> ok jY so there is a solution ?
[17:14:33] <link15> oh
[17:14:46] <link15> but would max_pool_size be the culprit of not being able to find master?
[17:14:49] <jY> http://api.mongodb.org/python/1.7/api/pymongo/connection.html
[17:14:55] <jY> no mention of it
[17:15:00] <Killerguy> yes...
[17:15:36] <jY> link15: what does your connect look like?
[17:16:23] <vlad-paiu> Anybody that can give a hand about how I can achieve some queries with the Mongo C API ? I want to run something like db.collection.find().sort{{field : -1})
[17:17:34] <link15> jY: Connection( current_app.config['MONGODB_HOST'], slave_okay=True, max_pool_size=1 )
[17:17:55] <link15> but i ripped out the max_pool_size since it was invalid
[17:18:01] <link15> but now i get can't find master
[17:18:14] <jY> what is MONGODB_HOST?
[17:18:17] <kali> vlad-paiu: that should be more or less straightforward, iirc
[17:18:24] <jY> it has to be a mongo uri
[17:18:24] <kali> vlad-paiu: how far have you gone ?
[17:18:30] <jY> to find the master.. not a single server
[17:18:52] <link15> interesting, so here is the way the code is set up
[17:19:20] <link15> http://pastie.org/6044341
[17:19:30] <link15> so should i not have a master and normal connection?
[17:19:34] <link15> and only go through one connect?
[17:19:41] <alexwaters> i want to findone but be sure that there is only one. is there a way to do findone and return one document with a count of the total documents matching the query? or do I have to pass two separate commands for that
[17:19:50] <jY> your current_app.config['MONGODB_HOST'] should not be a single host
[17:20:00] <vlad-paiu> kali: I guess I found the solution at http://api.mongodb.org/c/0.4/tutorial.html .. was kind of confused because I did not see an explicit sort parameter for the mongo_find command
[17:20:02] <jY> it should be a uri of all your hosts in the replicaset
[17:20:25] <vlad-paiu> will try it out :)
[17:20:58] <link15> jY what would that look like? if i have lets same slave at slave.domain.com
[17:21:01] <link15> and master at master.domain.com
[17:21:04] <link15> with default port settings
[17:21:45] <link15> sorry, i'm really new to mongo, inherited this code base
[17:22:00] <jY> conn = Connection("mongodb://host1:27017,host2:27017,host3t:27017")
[17:22:21] <link15> wierd, so i'm guessing host1 is master and hos2 is slave
[17:22:32] <link15> jY why would the previouse dev have two connections opened then
[17:22:47] <kali> vlad-paiu: sort is on the cursor on the high level languages
[17:22:47] <link15> jY: are they just being dumb, they could just be being dumb, from what i've seen they were a horrible coder
[17:23:06] <jY> link15: stupid dev
[17:23:15] <jY> or maybe it is a master/slave setup?
[17:23:42] <link15> jY: aye, we have a master mongo server and a slave mongo server
[17:23:45] <link15> not sure of their configurations
[17:24:03] <vlad-paiu> kali: unfortunately I'm dealing with the C driver.. which is not that smart :)
[17:24:12] <jY> ohh so it isn't a replica set then
[17:24:16] <kali> vlad-paiu: yeah, you need to craft the $query yourself :)
[17:24:19] <jY> so that's why they are doing it
[17:24:30] <kali> vlad-paiu: https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/rBK1OrlUo8w
[17:24:55] <kali> vlad-paiu: i guess c++ is not an option ?
[17:24:59] <link15> jY: so they are just passing somethign like mongo-slave.ourhost.com to the Connection call
[17:25:07] <link15> jY: is that still invalid for a master / slave relationship?
[17:25:18] <vlad-paiu> kali: no, unfortunately. but thank you very much, I can take it from here :)
[17:25:31] <kali> vlad-paiu: you're welcome
[17:25:58] <jY> link15: if you want to msg me do that.. i can help better there
[17:27:21] <vlad-paiu> kali: also, it's quite troublesome that the Mongo C driver expects the key names to always be null terminated.. :(
[17:28:02] <kali> vlad-paiu: well, that the way they're on the wire
[17:28:25] <kali> vlad-paiu: keys are C string, the rest is pascal-ish strings
[17:31:16] <vlad-paiu> kali: ok, thanks for the info. then I guess I have to manually null terminated:) oh joy
[17:31:51] <kali> vlad-paiu: realy ?
[17:32:26] <kali> vlad-paiu: i think the bson builder helpers take care of that...
[17:33:15] <vlad-paiu> well.. not sure. for example I have .. int bson_append_int( bson *b, const char *name, const int i ).. my 'name' is not 0 terminated, cause I get if from the wire from another source..
[17:34:46] <kali> vlad-paiu: you meant it's not a C constant hanging around but something coming from somewhere else ?
[17:35:26] <kali> vlad-paiu: sorry to state the obvious, but you're aware null-terminated strings are the usual way to deal with string in C ?
[17:37:04] <vlad-paiu> kali: well, yeah, the usual way, but not the best way, I guess. Anyway, not a biggie :) thanks for your help
[17:37:21] <kali> vlad-paiu: ok.
[18:28:58] <seban> hi, I have question about padding, compacting collection and resident memory. My mongods can take upto 24G od RAM, but takes only from 2G to 4G. But after I compact collection it grows to 16G - 18G. How compact can affect this?
[18:56:14] <JoeyJoeJo> What query would return all fields except for the _id filed?
[18:56:16] <JoeyJoeJo> field
[18:58:19] <strnadj> db.collection.find({}, { "_id" : false }) ?
[18:58:53] <strnadj> JoeyJoeJo: I try it now, and the command probably works ;-)
[19:52:28] <karptonite> Odd apparent bug I'm trying to track down. I am incrementing a count of a number of recommendations by upsert, and in one case our of many thousands, it seems as if the increment has failed--that is, it seems as if the upsert did not recognize the existing value, and inserted a 1 instead of incrementing by 1.
[19:53:43] <karptonite> specifically, I was incrementing inside of an object: $inc: { 'foo.bar.baz': 1}, essentially.
[19:54:01] <karptonite> with an upsert and a a search, of course.
[19:54:43] <karptonite> if it is relevant, the criteria was the _id field, but for this table, we are using just integers (userid) for the _id, not a MongoId.
[19:58:21] <jonesy> when you call createIndex(), that function populates a document in system.indexes, afaik. But it doesn't actually build the index itself. Where can I learn about how that happens? What reads system.indexes and says "oh, time to build this index!"?
[20:04:25] <jtomasrl> is it possible to change this size
[20:04:26] <jtomasrl> Please make at least 3379MB available in /data/db/journal or use --smallfiles
[20:10:23] <karptonite> For anyone who sees my question--I was wrong about how the increment failed--nothing for anyone to be concerned about.
[20:17:07] <thurmda> Can anyone help with an aggregration query? Here's my GIST https://gist.github.com/4709117
[20:48:42] <lazrahl> Using Casbah, is there a good source of info on how to handle members of the replica set disappearing from the network?
[20:49:34] <lazrahl> I'm trying to figure out how much auto-reconnect is there, if any. Or, whether I need to disconnect and reconnect?
[20:50:06] <kali> lazrahl: casbah relies on the java driver
[20:51:02] <lazrahl> So, I have mongo01, mongo02 and mongo03. if 2 and 3 die, and I'm configuring casbah to connect to 01, what do I do? When I had this come up, my app spent an hour or so trying to connect to 2 and 3.
[20:51:48] <kali> lazrahl: i'm not sure there are provision for reconnection on a totally failed replica set
[20:51:54] <lazrahl> I don't expect a total answer, I get that I need to go read...I just don't know where to start.
[20:52:41] <lazrahl> What if the config on 01 was changed such that it believed it was the only member and it was restarted?
[20:52:55] <kali> yeah i got that
[20:52:58] <lazrahl> Would casbah need a disconnect and reconnect?
[20:53:09] <kali> but i don't know if the driver can handle that without reconfiguring it
[20:54:13] <lazrahl> That would make sense to me. So, casbah has to disconnect and reconnect to get new meta data from the server about the replica set?
[20:55:02] <kali> well, even in a "simple" fail, with autorecovery, the driver usually let a bunch of request fail before everything is up again
[20:55:35] <kali> in the case of a double fail, i'm not even sure you can reconnect without changing the driver configuration
[20:56:41] <icenine> hi all, ive a question about the c# driver. what would be the easiest way one could imagine of copying just the indexes to another database? we're doing integration testing and i want to spin up the test db at set up, then destroy it during teardown.
[22:39:46] <karptonite> Hey, a question about findAndModify. Say I run findAndModify multiple times with w=0, returning the "old" record. is it possible that it could return a record that is not the most recently modified version?