PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 27th of January, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:06:44] <rhqq> guys, i've been looking through documentation but i couldnt find the answer. what user roles are required to view the http interface?
[00:06:59] <rhqq> i keep getting "not allowed"
[00:37:34] <george2> I need to run a radius of gyration function (http://paste.chakra-project.org/6314/) over my dataset. Should I be using map/reduce, or something else?
[00:38:25] <akarin> Hey guys, I had a question... I have a unique application and I feel mongodb would be the best choice for a starting point, but I have very specific needs regarding replication. Is it possible to somehow write a plug-in for mongodb where I could implement my own version of replication? If not, I suppose I could always write some sort of proxy server that sits between my application and mongodb and contact each server manually, but this is
[00:38:25] <akarin> kinda messy
[00:39:35] <george2> The builtin functions don't work for your purposes? http://docs.mongodb.org/manual/replication/
[00:42:10] <akarin> george2: I need to implement a special form of replication that basically allows for multiple primaries, and then they'll sieve results together upon rejoin if disconnected
[00:42:31] <george2> I have no idea what that means. :)
[00:44:42] <akarin> basically you can post updates to multiple servers, and if for some reason they're disconnected, it'll pick the latest update to be the final value for whatever item
[00:45:09] <akarin> most forms of replication only allow for one primary, and basically i'm doing something special
[01:08:45] <cheeser> akarin: no. no such extension is possible.
[01:09:02] <cheeser> short of patching the code and building it yourself, of course.
[03:59:36] <daniel-s> Hi
[04:00:32] <daniel-s> A question about database size: Why are databases so big? I mean, I have only been learning to use mongodb and experimenting with it a little. My DBs have only a few documents, but are several hundred MBs in size.
[04:00:48] <daniel-s> Will their sizes stay about the same until much more data is added?
[04:01:24] <daniel-s> Also, is there an option for something like, mongodb-lite? (like sqlite)
[04:01:42] <daniel-s> It seems mongodb is a little too heavy to embed in an application.
[04:03:17] <daniel-s> I have found this: https://github.com/Softmotions/ejdb
[04:51:50] <akarin> cheeser: thanks, patching the code it is, i guess
[05:31:58] <george2> I currently have thse functions http://paste.chakra-project.org/6322/ saved to my db.system.js. Can anyone help me figure out how I should run them over my dataset http://pastebin.kde.org/pc163fbcb/08004631/raw ? I want to collect all the posts matching userId "X" and put them through gyration() to get a radius of gyration measurement for each individual user.
[05:33:09] <george2> the "frequency" mentioned in the JS is just the number of data points for the user at location (lat, long)
[05:33:57] <george2> I'm unsure whether I need to do something with map/reduce (which I haven't used before), or if I can just use an aggregation pileline, or if I need to do something entirely different
[05:35:18] <george2> also, if it matters, I will be running this over a few hundred million data points, with probably a hew hundred thousand unique userIds
[07:26:12] <_rgn> is polling mongo for new objects a bad idea? to use it as a queue of sorts for background jobs
[07:26:20] <_rgn> tailable cursor doesn't seem reliable
[08:31:23] <imslavko> _rgn Meteor is an example of a system that looks for mongo updates. In particular, Meteor tails oplog
[08:31:33] <[AD]Turbo> hi there
[09:43:59] <soko> Trying mongoose.connection.collections['collectionName'].drop( function(err) { }); returns TypeError: Cannot call method 'drop' of undefined. I assume I need to define a collection first? What's the recommended way to do so? (I'm following the code from a book and I have either missed something or it's an error in the book.)
[10:16:35] <pplcf> http://pastie.org/8671448
[10:16:53] <pplcf> can anyone help please?
[10:17:36] <pplcf> i'm not sure if I get SocketError 9001 because of too big 'where in' query
[10:18:19] <kali> first line is a "slow request" warning line (which is truncated because the request is pathologically huge)
[10:19:58] <kali> second line looks like a crash client side
[10:20:11] <kali> which client is it ?
[10:20:22] <pplcf> node native
[10:21:00] <kali> can't offer specific help here, but you may want to test case the query with another client
[10:21:25] <pplcf> thank you very much
[10:32:50] <bzikarsky> How does mongos balance data I insert into a sharded cluster when no sharding is configured for the db and collection? Does it all go to shard1 until shard1 is full?
[10:37:36] <kali> yes
[10:40:24] <bzikarsky> Hm. We have a scenario with many smaller databases. It's a steadily growing numer, each is hovering around 1-10GB. It would be nice to balance the databases to multiple shards, so writes hit different shards (replsets-primaries)
[10:41:09] <Derick> bzikarsky: you can do that, but you need to do it manually.
[10:41:25] <Derick> bzikarsky: you can set a primary shard for each database (I think, only before you create it though)
[10:41:52] <eutheria> hi, i am just starting to look at mongo, i was wondering does it support schema constraints?
[10:43:01] <bzikarsky> Currently we load-balance manually to different clusters. I'm afraid that introducing sharding with manual configuration would only introduce an unneccesary layer of complexity
[10:43:02] <Derick> eutheria: no, it does not. That's something that is now pushed in your appliction
[10:43:15] <eutheria> ok no problem
[10:43:20] <Derick> bzikarsky: yes - I think your current solution is better
[11:06:31] <soko> Trying mongoose.connection.collections['collectionName'].drop( function(err) { }); returns TypeError: Cannot call method 'drop' of undefined. I assume I need to define a collection first? What's the recommended way to do so? (I'm following the code from a book and I have either missed something or it's an error in the book.)
[11:07:11] <soko> I've been stuck on this for a while and I can't see anything that I haven't followed. Any help is appreciated :-)
[11:19:01] <eutheria> i am trying to figure out if i should use mongodb, i am currently using orientdb, but struggling to integrate that with my java webapp
[11:20:59] <Nodex> eutheria : it's best to just ask the questions
[12:48:51] <idank> how do I tell a sharded cluster to rebalance after mongorestore on one of the mongod's?
[12:53:39] <cheeser> did you run mongorestore against the mongod or the mongos?
[13:02:37] <Secretmapper> anyone on?
[13:15:52] <idank> cheeser: against one of the mongod's
[13:16:06] <idank> (the primary one)
[13:16:20] <idank> can you even run it against mongos?
[13:16:40] <kali> you must never manipulates data against the mongod in sharding configuration
[13:17:22] <kali> always go through the mongos
[13:17:34] <kali> but i'm afraid you're even more confused than that
[13:17:43] <kali> how many primaries are they on your setup ?
[13:19:07] <idank> yeah the term primary may have been wroneg
[13:19:14] <idank> i meant the 'first' shard server
[13:19:26] <idank> the one that initially stores collections before they're sharded
[13:19:59] <idank> shard0000
[13:20:24] <joannac> is that astandalone or a replica set?
[13:20:59] <kali> ok, at least you have two shards
[13:21:52] <idank> standalone, no replicas
[13:22:05] <idank> ok, running against mongos seems to rebalance
[13:22:19] <idank> can i somehow salvage that collection i messed up? or do i have to recreate it?
[13:24:13] <kali> if you shake the whole setup (stop everything then restart, for starters) the sharding may pick it
[13:24:46] <kali> i assume it's a testing environment
[13:25:40] <idank> not really testing, but i tried restarting
[13:25:44] <idank> nothing changes
[13:25:51] <idank> i'll just drop and restore it
[13:26:17] <joannac> erm, no it won't. you basically have orphaned data. mongoS won't care.
[13:26:32] <idank> can i delete the orphaned data?
[13:26:58] <joannac> you can, but it's manual
[13:27:08] <idank> how manual? :)
[13:27:31] <joannac> very
[13:27:41] <idank> ok so nm, i'll drop and restore
[13:27:46] <idank> thanks!
[13:27:55] <joannac> if you're sure you have all the data, then sure
[14:38:08] <pwaleczek> hey guys, anyone can tell me gow to limit mongod do only one instance? It's spawning multiple subprocesses and I'd like to stop that.
[14:50:42] <Nodex> one instance of what?
[14:51:46] <Nodex> another happy customer ol
[14:52:21] <ron> next~
[14:52:22] <ron> !
[14:52:22] <pmxbot> #mongodb doesn't turn on the lights, he turns off the dark.
[14:52:24] <ron> bah.
[14:58:19] <byalaga> Hi, one of our replicatset member runs the configdb server, is there way to check whether its a mongodb primary or not?
[15:20:38] <joannac> byalaga: connect to it and run rs.status()?
[15:31:13] <saml> is there python example of oplog.rs ?
[15:31:16] <ranman> joannac: it's so weird to have you in the Eastern timezone
[15:31:21] <saml> i want to monitor new operations
[15:31:39] <saml> examples i found on the web polls (with time.sleep())
[15:53:59] <byalaga> joannac: I have connected to mongo configserver shell, I want to know if there is way/command to check if the sever is also running mongd.. rs.status() doesn't work as i have already connected to configserver
[16:15:25] <saml> how can I enable replSet and make it primary?
[16:15:55] <saml> replSet=set0 master=true I have these in config file. but i get "not master" when i insert to the mongod
[16:17:44] <cheeser> connect to the primary and ask it to step down
[16:18:24] <saml> i only have single mongod. let me try
[16:18:32] <cheeser> um...
[16:26:38] <saml> replication is hard
[16:38:16] <goreorto> Hi there, anybody answering questions?
[16:40:35] <saml> https://gist.github.com/saml/13c65c697195ba514784 i connect to both :27017 and :27018 using mongo shell. and non of them is master
[16:41:01] <saml> so i can't remove :27018 . i want to configure single node replica set
[16:43:03] <saml> so i can't do rs.remove() or rs.reconfig(cfg) because none of them is master
[16:47:00] <saml> > rs.stepDown(60)
[16:47:04] <saml> { "errmsg" : "not primary so can't step down", "ok" : 0 }
[16:48:39] <goreorto> I'm new to mongo and trying to understand how mapReduce works. I have a collection with about 3K records. When I perform a dump mapReduce, the records do not add up. db.events.mapReduce( function(){ emit('x', 1); }, function(k, vs){ return { x: vs.length }; }, { out: { inline: 1 } }). x ends up with a value of 6. Any hints are truly appreciated.
[17:07:00] <saml> hrm replSet option was wrong
[17:07:40] <saml> rs.status() showed "set": "rs0" but mongod were started with replSet=set0
[17:54:32] <shadfc> hey, i've got a test suite for a python app that drops and recreates a db from fixtures for each test. That appears to be really slow. Any pointers on how to make this faster? I'm currently doing it all from pymongo via drop_database and then bulk insert calls
[17:57:42] <joannac> ranman: It's weird being here!
[18:03:18] <ranman> joannac you're not working!
[18:03:23] <ranman> back to work!!!
[19:22:24] <shadfc> so this is pretty cool. When running my test suite against a local mongod, I have sporadic errors when querying using secondary preferred read preference. After removing the read pref, all tests pass. I am not using a replica set locally -- { "ok" : 0, "errmsg" : "not running with --replSet" }
[19:31:21] <ranman> shadfc: you should use smallfiles and no prealloc as command line params or config options for mongod to minimize the amount of time creating the new database creates
[19:31:30] <ranman> s/creates/takes
[19:32:22] <shadfc> ranman: i'll add those and see how it does
[19:32:59] <ranman> shadfc: in pymongo you should refrain from using a MongoClient to connect a replicaset, use a MongoReplicaSetClient for that. If you're not running with replication the secondaryPreffered readpref won't really work for... well I mean you don't have any secondaries so :P
[19:33:12] <ranman> and those errors are it attempting to find a secondary
[19:33:26] <steve1> I just had a brief site outage that stemmed from the following events: 1) 5-node replicaSet, 2) took 2 nodes down (one was master). A new master was elected from remaining members, but site stayed offline 3) A new node was added to replicaSet, 4) The replicaSet continued to be un-query-able until the down'd nodes were taken out of replicaSet. Can anyone help explain what happened to cause the outtage?
[19:35:08] <ranman> steve1: what were the responses from the mongod that lead you to believe it was unqueryable?
[19:35:22] <ranman> steve1: also please feel free to open a community support ticket in JIRA https://jira.mongodb.org/browse/SUPPORT
[19:36:14] <steve1> ranman: our PHP application was hanging while trying to connect to MongoDB.
[19:36:43] <ranman> steve1: I need more info that that sorry, specifically what was it hanging on? what URI were you passing in? were you passing in a good seedlist?
[19:37:03] <ranman> s/that/than
[19:37:07] <ranman> I can't type today it seems :)
[19:39:10] <steve1> ranman: connection string was for all good IPs: mongodb://172.16.0.20,172.16.0.21,172.16.0.22/?connectTimeoutMS=10000
[19:39:54] <ranman> and you don't have any more detailed info than the connection from the driver was hanging on that URI?
[19:41:23] <cheeser> 2
[19:42:07] <steve1> ranman: right. I was hoping it was just our process failure that you or someone could say "yeah, duh … look at this page". I'm creating a MongoDB/JIRA account now as you suggested, and will go through the logs to see if perhaps an error message was overlooked.
[19:43:07] <ranman> 2?
[19:45:17] <joannac> I would be curious if it's a problem with the PHP driver, or whether we didn't actually get a new primary elected (i.e. a server bug)
[19:46:19] <ranman> I don't think it's either, it feels like a misconfiguration on the app end
[19:46:56] <Joeskyyy> mongo feels?
[19:47:14] <ranman> that's what we should call the lolcode driver
[19:47:22] <joannac> ranman: or that :)
[19:47:37] <Joeskyyy> there's a lolcode driver for mongo?
[19:47:39] <Joeskyyy> Sharing is caring
[19:47:48] <cheeser> http://cdn.uproxx.com/wp-content/uploads/2012/03/Mongo.jpg
[19:47:48] <ranman> I mean... we could make one.
[19:47:59] <ranman> I thought he said "only pawn"
[19:48:03] <ranman> fact check?
[19:48:13] <ranman> http://www.youtube.com/watch?v=SKRma7PDW10
[19:48:26] <starfly> steve1: if the future, you might consider manually stepping down the primary when you know you need to take it offline: http://docs.mongodb.org/manual/tutorial/force-member-to-be-primary/
[19:48:40] <cheeser> ranman: http://www.imdb.com/title/tt0071230/quotes?item=qt0371642
[19:50:04] <Joeskyyy> Mongo needs a checkin driver — http://torso.me/chicken
[19:50:06] <ranman> cheeser: where do you find all these gifs?
[19:50:19] <Joeskyyy> s/checkin/chicken
[19:50:22] <cheeser> google.com
[19:50:23] <cheeser> :)
[19:51:00] <joannac> cheeser: do you do any work?
[19:51:08] <steve1> starfly: I suggested that, but I think the sysadmin prefers to be a chaos-monkey and test the fault-tolerance.
[19:51:13] <cheeser> you've been by my desk...
[19:51:28] <joannac> yeah, and the last time you were watching a video
[19:51:45] <joannac> and the time before that we were chatting about not-work
[19:51:53] <joannac> and the time before that you were buying me lunch :)
[19:51:59] <starfly> steve1: sure, I'm all for testing fault tolerance, just not on a system or replica set where uptime matters
[19:52:44] <cheeser> so you're always walking by my desk ... and not working. that's what I'm hearing.
[19:53:42] <steve1> starfly: preaching to the choir. :) but by the same token, if fault-tolerance is not tolerant in production, then it's not really tolerant.
[19:54:03] <starfly> steve1: agreed, you "shouldn't" have had an issue
[19:56:53] <steve1> ranman may be right; it could be a mis-configuration on the app end. we've traditionally had a lot of pain with the fault-tolerance of MongoDB replicaSets. At the very least, the downtime may be enough motivation for the business to allow us spending time on finding those weak links.
[20:01:37] <starfly> steve1: yeah, you don't know what you've got until it's gone… Most innovation stems from catastrophes
[20:10:01] <saml> http://docs.mongodb.org/manual/core/replica-set-oplog/
[20:10:05] <saml> what is oplog?
[20:10:10] <saml> is it local.oplog.rs ?
[20:10:27] <saml> or are there other oplogs ?
[20:10:38] <cheeser> the oplog is used for replication
[20:10:46] <saml> so what's "the oplog" ?
[20:10:52] <saml> the doc doesn't say anything about
[20:11:04] <saml> which db do I connect to.. and which collection is the oplog?
[20:11:08] <joannac> that's where the oplog is stored
[20:11:15] <joannac> local.oplog.rs
[20:11:16] <saml> i've been using local db's oplog.rs
[20:11:32] <saml> thanks. it'd be nice if the document is updated
[20:11:49] <cheeser> using? for what?
[20:12:03] <joannac> Updated in what way? What do you want changed?
[20:12:04] <saml> for psuedo trigger
[20:12:16] <saml> i want to monitor all db events (mostly update, insert, delete)
[20:12:26] <saml> so that i can do stuff on those events
[20:12:31] <cheeser> ah. ok.
[20:12:41] <cheeser> we did that at my last company for feeding docs to solr
[20:12:49] <saml> yah which isn't open source
[20:12:56] <saml> so i need to find stuff out on my own
[20:13:11] <saml> basic idea is to .find() with await and tailable flag on
[20:13:20] <saml> and sleep for a sec
[20:13:24] <saml> and find again
[20:13:37] <saml> essentially polling
[20:13:49] <saml> polling oplog.rs for new document (using ts timestamp)
[21:06:18] <NyB> Is it just me or is the specification at bsonspec.org somewhat incomplete at points?
[21:07:35] <cheeser> without details, it's hard to say. ;)
[21:10:25] <NyB> cheeser: for example I cannot find the specification for both UUID versions, ObjectId, MD5, DBPointer, Timestamp
[21:10:48] <NyB> more specifically I lack details w.r.t. endianess etc.
[21:11:52] <NyB> I have been reading the MongoDB BSON decoder code, but I sure would like an actual document with those details
[21:12:49] <NyB> For example, what is the difference between the old and the new UUID binary subtypes?
[21:13:35] <cheeser> we were just discussing that last week in the office, actually.
[21:14:02] <NyB> ...the version of the Java driver that I am using (latest 2.x.x) does not seem to even support the new UUID serialization...
[21:14:17] <NyB> cheeser: :-)
[21:14:29] <cheeser> asking a coworker now
[21:14:36] <cheeser> you're on 2.11.3?
[21:15:13] <NyB> cheeser: lemme check, I use Maven so it might be a couple of releases back...
[21:15:23] <cheeser> type 4 specifies the RFC encoding RFC-4122
[21:15:29] <NyB> 2.11.3
[21:17:13] <NyB> cheeser: thanks, that confirms an assumption that I had made...
[21:17:31] <NyB> type 4 uses big-endian octet layout...
[21:18:25] <NyB> type 3 uses two little-endian 32-bit integers...
[21:19:02] <NyB> cheeser: so now I have to figure out the rest :-)
[21:19:23] <cheeser> .4 is the latest btw
[21:20:02] <cheeser> NyB: this might help: http://docs.mongodb.org/meta-driver/latest/
[21:23:08] <NyB> cheeser: interesting... I am writing a new BSONDecoder implementation, so this may come handy
[21:25:19] <cheeser> good luck. i was just saying i'm not sure I could write one with what's up there. it *does* seem a bit incompletely.
[21:25:23] <cheeser> s/ly//
[21:27:29] <NyB> cheeser: well, to be honest for my application getting some cases wrong might not even be noticed. Why would anyone want to store regexes in a BSON document ? :-p
[21:28:11] <cheeser> sending queries to the server for one
[21:29:19] <NyB> cheeser: :-)
[21:29:40] <NyB> JSON isn't all that well defined in some cases either...
[22:19:09] <saml> cheeser, did you send to solr each mongodb document? or did you collect updated/inserted/deleted documents and sent to solr in batch ?
[22:19:32] <cheeser> each one individually. otherwise that watcher would have to cache
[22:19:51] <saml> yah. i wonder if solr can handle frequent updates
[22:52:01] <sflint> does anyone here use mongodb chef cookbook? to deploy config servers
[23:15:46] <TheDracle> couldn't add user: Only admin.system.users entries may contain 'otherDBRoles' fields
[23:15:59] <TheDracle> Anyone know why I can't add users with otherDBRoles fields set?
[23:16:14] <TheDracle> Using db.addUser
[23:18:49] <joannac> because only the admin db supports otherDBRoles ?
[23:19:10] <TheDracle> http://docs.mongodb.org/manual/reference/method/db.addUser/
[23:19:14] <DevRosemberg> Hello Everyone, i need a bit of help with something
[23:19:29] <TheDracle> "otherDBRoles document Optional. Roles this user has on other databases."
[23:19:39] <DevRosemberg> http://pastie.org/8673538 in there, Achievements, Permissions and Purchased Items dont work
[23:20:00] <TheDracle> It seems to indicate it ought to be a valid field.
[23:21:12] <joannac> TheDracle: http://docs.mongodb.org/manual/tutorial/add-user-to-database/, last example "Only the admin database supports the otherDBRoles field."
[23:21:21] <joannac> I'll file a DOCS ticket for you
[23:21:26] <DevRosemberg> Anyone?
[23:22:25] <Joeskyyy> Might help to define "dont work"
[23:22:32] <TheDracle> joannac, Thanks :) I thought i was going crazy :p
[23:22:51] <Joeskyyy> Or possible an error report in another paste
[23:23:06] <DevRosemberg> They dont save
[23:23:20] <Joeskyyy> Can you make them? haha
[23:23:21] <DevRosemberg> like a player joins back and its like if they had never joined, permissions, comets and stuff work
[23:23:55] <Joeskyyy> Ah you mean the fields don't save.
[23:24:10] <DevRosemberg> Yes
[23:24:56] <Joeskyyy> Not familiar enough with the java drivers sorry :\
[23:26:44] <DevRosemberg> Anyone in here familiar with them?
[23:52:39] <paulkon> as I understand it, the $ projection requires a field of the array in question to be present in the query document itself. Is it possible to project an array field if it is present without it being a part of the query itself?
[23:52:41] <paulkon> I want to return the array element if one of its subdocuments match a subdocument field but still return the document itself if it doesn't exist