PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 7th of April, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:54:57] <tpayne> Hello. I'm trying to setup mongo to support auth. When creating a user with readWrite access that my client uses, do i create it on the admin database or on the actual database?
[01:38:46] <joannac> tpayne: the actual database
[01:39:08] <joannac> however it may need extra roles as well, depending if you're in a replset, sharded, and what you're doing
[01:44:44] <Guest31177> What does raw: true on a collection do on nodejs?
[01:44:54] <tpayne> ok i got it working
[01:44:57] <tpayne> thanks!
[01:46:11] <joannac> Guest31177: "raw - driver returns documents as bson binary Buffer objects, default:false
[01:46:21] <joannac> Guest31177: from http://mongodb.github.io/node-mongodb-native/markdown-docs/queries.html
[01:51:08] <kevbook> Thanks, im trying to evaluate should my node server just respond with buffer object and save processing
[02:31:08] <tongcx> hi guys, what database can enfore all records have specfic fields with required types?
[03:31:25] <e^0_> in mongodb we have to work from cli or their is a GUI ?
[03:52:32] <langemann> hello
[03:52:33] <langemann> http://pastebin.com/9Vs7aTkL
[03:52:51] <langemann> I have this setup for my mongodb, am I far off when it comes to best practice?
[03:53:15] <langemann> Or, the best way to save some data? This is part of the MEAN-stack so I'm retrieving and updating a lot.
[03:54:24] <joannac> How much nesting do you have?
[03:54:46] <langemann> Max 3 leves.
[03:54:51] <langemann> root -> sub -> sub -> some data
[03:55:09] <joannac> how many categories can there be?
[03:55:35] <langemann> As many as the system can handle. I really don't know, 100-200 perhaps.
[03:55:49] <joannac> You might hit the maximum document size limit, then
[03:56:14] <langemann> I originally had them all split up in 4 different collections, tying them together using a relation-key which was set as their parent objectID - better solution?
[03:56:32] <joannac> depends how you're using them
[03:56:55] <joannac> if you're retrieving a category, do you need to see all the subcategories
[03:57:00] <joannac> and sub-sub-categories?
[03:57:34] <langemann> No. The categories are mainly used for navigation in a toolbar
[03:58:10] <langemann> Also, when a user wants to add new subcategories, I retrieve them
[04:00:41] <langemann> I also was thinking about just having one collection and differentiating on the category-name, but I think that would give to little room to filter.
[04:02:54] <joannac> I suspect you'll hit https://jira.mongodb.org/browse/SERVER-831 at some stage
[04:06:25] <langemann> Huh, okay.
[04:06:28] <langemann> Thanks.
[04:06:50] <langemann> I guess I'll have to tie the data to another data-collection using some value then.
[04:13:35] <paulkon> what's the recommended max size for a shard before another shard should be added?
[04:13:46] <paulkon> disk space*
[04:14:12] <paulkon> I'm a bit new to running mongo in production
[04:31:07] <joannac> proteneer: Disk space isn't really a metric used to determine when to shard
[04:31:27] <joannac> For a start, it would depend on whether you were on spinning disks, SSDs, network attached storage, etc...
[04:32:05] <joannac> You shard when your hardware isn't keeping up with your load, and it's easier to get more hardware than to get better hardware
[05:58:17] <mongols> hello?
[05:58:25] <mongols> anybody?
[06:04:12] <mongols> ;(
[06:10:23] <joannac> mongols: yes?
[08:08:31] <arussel> when I install the package from 10gen, I have this line: daemon --user "$MONGO_USER" $NUMACTL $mongod $OPTIONS in the start function of /etc/init.d/mongod
[08:08:36] <arussel> it never returns
[08:08:43] <arussel> any idea ?
[08:11:55] <faved> hey, quick question. if you have a data field that you want to set a TTL on using expireAfterSeconds. is there a way that you can roll that expire, so say its set to expire after 60 seconds, js there a call i can make @ 50 seconds that will reset it to 60 ?
[08:17:35] <ollivera> Does MongoDB support automatic cross datacenter replication?
[08:17:54] <Nodex> ollivera : you control your replication
[08:18:30] <Nodex> if you want your writes to scale to X/Y/Z then you can add that to your query or (I think) set it up as a default on your replica set
[08:24:50] <ollivera> Nodex, Okay, so it is possible to configure MongoDB so that if my primary data center goes down. I'll have automatic election of a new primary and failover. That's my question :)
[08:27:54] <Nodex> I suggest you read the doocumentation, it's all explained in there
[08:32:40] <arussel> this is in the starting script of the yum package:
[08:32:42] <arussel> DBPATH=`awk -F= '/^dbpath=/{print $2}' "$CONFIGFILE"`
[08:32:42] <arussel> PIDFILE=`awk -F= '/^dbpath\s=\s/{print $2}' "$CONFIGFILE"`
[08:32:55] <arussel> how does it expect a value for both dbpath and pidfile ?
[08:33:44] <Berg> hello im trying to sort my data using pymongo i have been able to sort player profiles into alphabetical list but now i need to limit that list to 20 profiles so as to put it in a web page sortlist=db.users.find().sort(keyword, method) that is the sort method
[08:40:26] <arussel> the 'daemon' command is not installed on my machine (aws ami), which package should provide it ?
[08:47:01] <Berg> FOUND method
[08:47:12] <Berg> sortlist=db.users.find().sort(keyword, method)[20:40]
[08:47:27] <Berg> this will list 20 items
[09:13:31] <mylord> starting out, is it a decent or bad decision, generally, to prefer databases over collections? ie, have only 1 collection per database, and have about 10 dbs, for concepts like tourmanets, scores, users, winners, turnyResults, etc
[09:13:52] <mylord> would it be bad if each woudl be separate database, instead of collection?
[09:14:41] <mylord> initially i thought since each database has its own write lock, it might be useful to have separate databases for performance, at least while data is small and possibly mostly in RAM?
[09:15:04] <mylord> and then have the big data, espcially, dbs, in separate dbs?
[09:15:50] <eklavya> one of my queries is not having any effect
[09:16:03] <eklavya> so I started mongod with logging enabled
[09:16:10] <eklavya> with this
[09:16:11] <eklavya> sudo mongod --profile=1 --slowms=1 --dbpath=/var/lib/mongodb
[09:16:22] <eklavya> but the queries are still not showing up
[09:17:09] <eklavya> can someone please help?
[10:42:30] <k_sze[work]> Hello. I suspect that one of the members in our replica set ran out of disk space while trying to synchronize data over.
[10:42:50] <k_sze[work]> How can I verify that that is the case?
[10:43:12] <k_sze[work]> (and what can I do without losing data?)
[10:43:54] <k_sze[work]> Can I just shut down that member, add more disk space and then start that member again?
[10:54:12] <aberrios> mongoNoob here. If I have a collection "jobs" and the documents have a field "status". And I have a process that grabs all jobs that have status "waiting" and updates the job to have a field "foo" = "bar" and "status" = "active". I'm worried that as the jobs collection grows this process is just going to get slowler and slower. How would others approach this problem? I suppose in a RDB i would have a table live_jobs and once the process has run move t
[11:01:30] <slikts> is there a way to set a callback for when a specific field is changed in mongoose?
[11:01:44] <slikts> I want to hash the password field before saving, but not if it's already hashed
[11:02:34] <slikts> I currently check for .isNew and hash the field then, but I have to remember to do it manually when updating it
[11:17:30] <BostjanWrk-> hi
[11:17:42] <BostjanWrk-> i have collection with documents like this http://pastebin.com/vhKpaSQn
[11:17:57] <BostjanWrk-> how can i select all records who have only 1 row in "events"
[11:22:46] <ncls> BostjanWrk-: looks complicated
[11:23:19] <BostjanWrk-> i know :\
[11:23:34] <BostjanWrk-> documents with only 1 event are not important so i want to delete them :
[11:23:35] <BostjanWrk-> :D
[11:23:46] <BostjanWrk-> i'll probaby just write php script
[11:23:50] <BostjanWrk-> which will do that
[11:38:26] <mxck> Hi!
[11:40:50] <bel3atar> hi
[11:42:21] <mxck> What is the best MongoDB ORM for python?
[11:42:28] <mxck> Or i need use just PyMongo?
[11:45:43] <kali> mxck: it's a good idea to start with the driver before stacking layers and layers on top of it
[11:47:00] <kali> mxck: adaptation between a scripting language like python and mongodb is less painfull than other combination (sql vs anything, or mongodb with a strongly typed language)
[11:49:25] <mxck> kali thx!
[11:49:44] <bel3atar> can I do everything mysql does in mongodb?
[11:50:02] <bel3atar> or any other rdbms
[11:50:17] <ncls> BostjanWrk-: yes I think a script will be easier to write than a query to do that !
[11:52:29] <kali> bel3atar: some things are easier or way easier, other are harder, or way harder
[12:03:40] <mylord> should i typically use just 1 database per application/biz-entity?
[12:03:58] <mylord> (with multiple collections?)
[12:04:21] <mylord> is there a performance benefit, potentiall, to using multiple databases instead of collections? or performance loss, typically?
[12:09:55] <Nodex> mylord : it's really down to you
[12:10:43] <mylord> database keeps ‘separate files in filesystem’ for each database, so would that affect read/write?
[12:10:56] <kali> every database comes with its own write lock, but it also comes with about at least 128MB
[12:11:02] <mylord> does mongodb write-lock per entire database, or per collection-document, only?
[12:11:28] <mylord> i don’t mind the 128MB.. i have eg 2TB per server
[12:11:35] <kali> mylord: it's write-lock per database. but unless you are planning on building something really huge, it's not going to be a problem
[12:11:50] <kali> mylord: and it's not that simple about the 128MB because they will be mapped to memory
[12:12:09] <mylord> k.. also have 64GB RAM on dedicated server, for now
[12:12:27] <slikts> I personally didn't like using straight mongo
[12:12:38] <slikts> something like mongoose seems much nicer
[12:13:07] <slikts> the api is kind of clunky
[12:13:08] <mylord> kali, but performance wise, database over collection, if 128 * num_dbs RAM isn’t a problem?
[12:13:20] <kali> mylord: depends on num_dbs :)
[12:14:26] <mylord> kali, in case of file-system usage, will database be much slower than collection, or negligable slower, or?
[12:16:01] <kali> slikts: well, at least you got some understanding of what was mongodb... people going straight for the ODM are so lost when the ODM fails them...
[12:16:03] <Nodex> slikts : you really should learn the raw uery language a little before using an ORM
[12:16:12] <Nodex> ORM/ODM *
[12:16:13] <kali> Nodex: i was first.
[12:16:19] <Nodex> :P
[12:16:52] <slikts> Nodex: I did use it
[12:17:19] <kali> mylord: once again, it depends if you're planning hundred of databases or 5 of them
[12:18:02] <tazz> The use exists, password is correct yet i get "Error: 18 { code: 18, ok: 0.0, errmsg: "auth fails" } at src/mongo/shell/db.js:228"
[12:18:03] <mylord> kali, i suppose i’d try to limit it at about 10 if 128MB each
[12:18:55] <mylord> about 10-20 DBs seems to make sense then.. don’t want more than about 1-3GB ram overhead..
[12:19:04] <kali> mylord: honestly, just do what is logical (mr_spock, not here today, but...)
[12:19:09] <mylord> can i easily switch from collections to databases later/
[12:20:38] <kali> mylord: really, for 1GB of data, stop worrying and do whatever make sense
[12:20:50] <kali> mylord: the rest is premature optimisation
[12:21:29] <Nodex> the only time I hit lock contention is when I am processing large numbers of files inside the same collection
[12:21:44] <Nodex> it hangs my app for a second at most
[12:22:40] <Nodex> eventually I will just move the relevant parts to a queue when I can be bothered then it's never really a problem
[12:43:17] <moas> hi
[12:44:18] <moas> hi
[12:45:45] <moas> I try to set unique field on my collection via ensure_index (pymongo) but I've obtain None
[12:46:00] <moas> and unique index not created
[13:15:16] <asturel> anyone can help me? i try to rs.add but i get "assertion" : "set name does not match the set name host asturel.hu:27017 expects",
[13:34:54] <joannac> asturel: you started them all with the same --replSet XXX command line option?
[13:37:07] <joannac> moas: sample code (pastebin)?
[13:50:00] <ShortWave> hi all
[13:52:49] <Nodex> best to just ask any questions
[13:52:58] <moas> joannac, http://pastebin.com/frkTfkBm
[13:54:13] <moas> joannac, and my yaml collections config
[13:54:14] <moas> http://pastebin.com/iNnKyiFR
[13:57:16] <moas> Some unique index are created but not others
[13:57:30] <joannac> which ones are created?
[13:57:35] <asturel> joannac yeah
[13:57:54] <joannac> what's the difference between the ones that are, and the ones that aren't?
[13:58:35] <asturel> well i dont know where i should add it on debian
[13:58:39] <asturel> but i did rs.reconfig
[13:58:57] <joannac> asturel: umm
[13:59:02] <joannac> how did you start mongodb?
[13:59:06] <asturel> and the sec shows as 'rs1'
[13:59:12] <asturel> ofc, i can login to them
[13:59:19] <asturel> vice-versa
[13:59:58] <joannac> asturel: go to your primary and run rs.conf()
[14:00:37] <asturel> and paste it?
[14:00:55] <asturel> i tried rs.add that host which is rs.conf
[14:01:06] <joannac> then go to the server you're trying to add and run db.serverCmdLineOpts()
[14:01:19] <joannac> pastebin both
[14:03:09] <asturel> http://pastebin.com/NSQD5nKY
[14:03:27] <asturel> well yesterday i someshow set the second as secondary idk why's primary now
[14:03:59] <joannac> um, dude
[14:04:10] <joannac> you have 2 primaries
[14:04:34] <joannac> also, one is "rs0" and one is "rs1"
[14:05:06] <moas> joannac, this config http://pastebin.com/n4R31AUG
[14:05:17] <moas> work fine!
[14:05:31] <ShortWave> What is the best way to get the distance from a geospatial query?
[14:07:26] <moas> I don't see the origin of the problem
[14:07:36] <joannac> moas: what does a value of XXX: 0 mean for an index?
[14:08:13] <joannac> asturel: 1. make sure both mongods have the same --replSet argument 2. only your primary should be initiated
[14:08:34] <joannac> asturel: if you have no data, i would wipe one, start it with the right argument, then rs.add() it
[14:08:54] <joannac> if you have data you'll need to manually merge your data first :/
[14:09:03] <joannac> i'm out, gl
[14:12:34] <moas> joannac, 0 value is an error but the modification (set to 1 or -1) doesn't fix my problem
[14:12:43] <moas> sorry for my english, i'm french man
[14:14:48] <asturel> same replset?
[14:16:57] <asturel> ah, works, thanks much
[14:26:41] <koc> Hi everyone
[14:27:08] <koc> db.serverStatus() shows different local time as my server time.
[14:27:30] <koc> How can I enable it to show exact same date with the server?
[14:27:35] <koc> thanks for help
[14:31:16] <asturel> on the primary i get this now for the secondary on rs.status "lastHeartbeatMessage" : "rollback 2 error findcommonpoint waiting a while before trying again"
[14:31:41] <asturel> if i would the db will it fix it?
[14:32:12] <asturel> but i cant drop Mon Apr 7 16:31:43 uncaught exception: drop failed: { "errmsg" : "not master", "ok" : 0 }
[14:35:56] <asturel> only way is to delete the dbpath?
[14:36:29] <asturel> bah i did it but i get "lastHeartbeatMessage" : "rollback 2 error findcommonpoint waiting a while before trying again"
[14:39:40] <amitprakash> Hi, pymongo throws a InvalidDocument: Cannot encode object: {'sd': {}} .. How do I resolve this?
[14:49:33] <rkgarcia> amitprakash: maybe the single quote, replace with "
[14:49:39] <rkgarcia> double
[14:55:10] <ShortWave> Hrm
[15:11:10] <amitprakash> rkgarcia, pymongo shouldn't care about ' or "
[15:11:16] <amitprakash> since both are equivalent in python
[15:24:53] <ShortWave> Dammit, I'm gonna have to become a mongo expert, and write a damned driver.
[15:27:03] <cheeser> why?
[15:27:16] <cheeser> the first i advise, the second not so much
[15:28:34] <Nodex> haha
[15:28:53] <ShortWave> Well, let's say I have an idea.
[15:29:41] <cheeser> done
[15:29:51] <ShortWave> if I just wanted to start building a driver, would it be better to A: Reverse engineer existing drivers? Or B. start from scratch.
[15:29:54] <ShortWave> ?
[15:30:08] <cheeser> 1. depends on the idea. 2. probably neither.
[15:30:29] <ShortWave> I was considering Lua.
[15:30:39] <cheeser> you want a lua driver?
[15:31:21] <ShortWave> Not quite a full lua driver, but more like a customized lua-based client that could speak the driver language.
[15:31:53] <ShortWave> alternatively, I could just drive it via plain-text terminal session
[15:32:57] <cheeser> lua runs on the JVM, yeah?
[15:33:17] <ShortWave> Well it's an extension language.
[15:33:33] <ShortWave> I'm compiling it into a larger application.
[15:33:49] <ShortWave> Like, WoW uses Lua.
[15:33:53] <cheeser> what i'm doing for my kotlin driver is wrapping around the 3.0 java driver core.
[15:34:13] <cheeser> so my kotlin driver exposes a kotliny API but delegates underneath to the java driver.
[15:34:27] <cheeser> much less work than writing your own driver.
[15:34:28] <ShortWave> no matter what I do, I have to write some kind of boilerplate translation logic to go from lua to the host application's networking interfaces
[15:35:31] <skot> lua is not jvm based. it is a c-style language and there are drivers already: https://github.com/moai/luamongo
[15:37:25] <skot> There may be interpreters in many languages but the main compiler creates machine code like c/c++/etc.
[15:37:29] <skot> Here is a list of impls: http://lua-users.org/wiki/LuaImplementations
[15:42:02] <cheeser> hrm. i thought lua could run on the jvm. cloudera has a java app that use lua for configs/commands.
[15:53:02] <skot> Yep, there are interpreters out there, and the main distro has one too which is machine compiled.
[15:53:41] <cheeser> makes sense. i think the unreal engine uses lua so they'd need/want that native code in any case.
[15:54:09] <skot> It does well in a "scripting" environment for things like that, and games (which is generally c/c++)
[15:57:48] <saml> select distict status from tb; how do I do that?
[15:58:28] <rkgarcia> saml: use aggregation framework
[15:58:42] <cheeser> db.tb.distinct("status")
[15:58:55] <saml> articles@mongo01> use aggregation framework;
[15:58:55] <saml> Mon Apr 7 11:58:36 Error: [aggregation framework] is not a valid database name src/mongo/shell/mongo.js:40
[15:59:02] <saml> oh
[15:59:18] <saml> db.tb.distinct("status") => [ ]
[15:59:27] <saml> is tb collection builtin?
[15:59:32] <saml> oh
[16:00:10] <saml> nice. http://docs.mongodb.org/manual/reference/method/db.collection.distinct/
[16:05:08] <arrty> I'm tired of reading bad things about mongo. Can the downsides of mongo be mitigated easily?
[16:06:51] <Nodex> which downsides?
[16:07:16] <arrty> the global read/ write lock
[16:07:27] <Nodex> it's not global
[16:07:35] <Nodex> per database ;)
[16:07:52] <arrty> gotcha, so that's easy enough to get around
[16:08:15] <cheeser> and less of an actual problem than a theoretical one.
[16:08:24] <arrty> and i can force disk flushing to occur more often with a simple config
[16:09:15] <Nodex> you can force fsync with write concern
[16:09:39] <Nodex> http://docs.mongodb.org/manual/core/write-concern/
[16:13:00] <Nodex> perhaps this might be more relevant to you http://docs.mongodb.org/manual/tutorial/manage-journaling/
[17:04:15] <ShortWave> Question
[17:04:23] <ShortWave> if I'm using $match, can I use $not?
[17:04:29] <ShortWave> It claims to be an aggregation operator...
[17:04:55] <ShortWave> or should I use $match + $ne?
[17:45:35] <Danny_Joris> I added replSet = rs0 and oplogSize = 100 to my mongodb.conf file in ubuntu. Though when I log in I don’t think it’s working.
[17:45:55] <Danny_Joris> when checking db.getCollectionNames(), I get this error: { "$err" : "not master and slaveOk=false", "code" : 13435 } at src/mongo/shell/query.js:128
[17:46:22] <Danny_Joris> on stackoverflow I read I should use rs.slaveOk() but that doesn’t help
[17:46:25] <Danny_Joris> any ideas?
[17:46:33] <cheeser> rs.slaveOk(true)
[17:46:39] <cheeser> or connect to a primary
[17:47:19] <visually> hello -- is 2.2 a still supported release?
[17:48:04] <Danny_Joris> how do I connect to a primary. I feel on osx it did automatically. but on Ubuntu I’m dealing with service stop/start etc
[17:50:20] <Danny_Joris> locally all I had to do is mongod --replSet rs0 --oplogSize 100
[17:50:36] <Joeskyyy> Danny_Joris: As long as it's set in your mongo.conf file you should be fine
[17:50:44] <Joeskyyy> make sure you stop then start the service after making conf changes
[17:50:48] <Danny_Joris> I did
[17:50:50] <Danny_Joris> odd
[17:50:54] <Danny_Joris> that’s what I assumed as well
[17:51:17] <Joeskyyy> rs.slaveOk() should allow you to read from a secondary
[17:51:26] <Joeskyyy> what's your rs.status() on the secondary?
[17:52:13] <Danny_Joris> not even sure what I’m on but it shows this:
[17:52:31] <Joeskyyy> pastebin btw
[17:52:35] <Joeskyyy> dont wall text here :\
[17:52:52] <Danny_Joris> http://pastebin.com/WneB9Wzt
[17:52:54] <Joeskyyy> Thanks
[17:52:54] <Danny_Joris> :)
[17:53:14] <Joeskyyy> Where is your master at?
[17:53:26] <Joeskyyy> Or are you running this all on one machine?
[17:54:24] <Danny_Joris> one machine - I need a replica set to push it to elasticsearch using the mongodb river
[17:54:31] <Joeskyyy> Because you should have a master that has an rs.conf() with all your hosts listed
[17:55:04] <Joeskyyy> might wanna follow this
[17:55:04] <Joeskyyy> http://docs.mongodb.org/manual/tutorial/deploy-replica-set-for-testing/
[17:55:12] <Joeskyyy> That's for deploying a local replSet for dev purposes
[17:55:13] <Joeskyyy> All on one box
[17:56:55] <Danny_Joris> looks like rs.initiate() got me in the primary
[18:00:11] <Danny_Joris> Joeskyyy: thanks for your help
[18:00:14] <Danny_Joris> Joeskyyy++
[18:00:26] <Joeskyyy> Np
[18:00:41] <visually> are bugs still being fixed on 2.2? i see there is a 2.2.7
[18:02:21] <cheeser> "real soon now(tm)"
[18:02:47] <_sri> it's funny how 2.6.1 has a planned release date already
[18:41:35] <mboman> I have an issue when I try to download a file from GridFS using python: The way I do it stores the whole lot in memory before writing to file and I need a more memory-efficient way to do it..
[18:43:59] <mboman> They way i do it now: https://github.com/mboman/vxcage-jobs/blob/master/utils.py : the get_file() function...
[18:46:16] <mboman> Ah.. Think I found it.. Need to supply size parameter to read() and iterate
[19:17:48] <ShortWave> I'm getting an error I don't understand.
[19:24:33] <mboman> ShortWave, and the error message is?
[19:24:55] <ShortWave> MongoError: exception: geoNear command failed: { ns: "drupal.offers", errmsg: "exception: assertion src/mongo/db/../bson/bsonobjiterator.h:79", code: 0, ok: 0.0 }
[19:25:31] <mboman> ShortWave, and the query?
[19:26:39] <ShortWave> http://pastie.org/private/s78y15l7x7phf5tdajpwq
[19:27:23] <cheeser> do you have 2d indexes defined on that field?
[19:28:00] <ShortWave> yes
[19:32:05] <in_deep_thought> should starting mongodb be different on arch linux? I try mongod and it gives me ERROR: dbpath (/data/db/) does not exist. but then according to the arch linux wiki I try sudo systemctl start mongodb and it works
[19:32:11] <asturel> if i have a document like { something:{something2="x"}} how can i find it by something2 value?
[19:32:31] <asturel> db...find({something:{something2="x"}}) gives empty
[19:33:06] <cheeser> in_deep_thought: probably a permissions issue on that directory when start it as non-root/mongodb user
[19:33:34] <in_deep_thought> cheeser, so can I just use sudo systemctl start mongodb all the time without issue?
[19:33:38] <cheeser> db....find({"something.something2", "x"})
[19:33:52] <cheeser> in_deep_thought: i don't know why you wouldn't want to do that anyway.
[19:34:13] <cheeser> most services tend to run as either root (ugh) or specific user accounts to isolate permissions
[19:34:43] <in_deep_thought> I read everywhere that you start it with mongod but I guess that doesn't guarantee I have the right permissions user info
[19:35:13] <asturel> ah thanks
[19:35:26] <cheeser> systemctl starts it "with mongod" but can do user magic and the like
[19:35:42] <in_deep_thought> ok thanks
[19:36:11] <asturel> cheeser Mon Apr 7 21:35:48.500 SyntaxError: Unexpected token ,
[19:36:19] <cheeser> s/,/://
[19:36:40] <asturel> ah yeah
[19:36:41] <asturel> thanks
[19:39:59] <in_deep_thought> I get Mon Apr 7 12:37:48.119 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145 when I try and connect to the shell with mongo. The start command ran without error. I can't tell what is going on in this error aas it doesn't give me much info
[19:41:31] <mboman> ShortWave, Sorry, I have not been using geolocation with MongoDB before :(
[20:03:13] <in_deep_thought> I would ask this on the mongoose irc but there doesn't seem to be anyone there: when I use the mongoose.connect() command in node does that switch the current mongo database to the one I specify, or do I need to manually switch it first with the mongo shell?
[20:06:17] <in_deep_thought> it looks like I had to manually switch it
[20:13:13] <asturel> could mongodb run on an amazon aws free tier?
[20:13:24] <asturel> for low usage
[20:13:54] <asturel> basicly mostly insert like 1 insert / s
[20:16:20] <Joeskyyy> is it possible? Yes, should you do it, absolutely not lol
[20:18:07] <Joeskyyy> You'd run out of memory all the time, and it'd be so terribly slow.
[20:18:21] <Joeskyyy> Depending on what you're storing you may want to try a different datastore, like Redis or something
[20:19:00] <Joeskyyy> Redis could be a problem too though, since that's all in mem, just depends on what you're doing again
[20:22:30] <BlakeRG> Hello all, i have a collection of documents with a 'birthday' field in each, whats the best way to pull out a list of age ranges for those documents if the date format is something like '01/10/1979'
[20:24:17] <Joeskyyy> You should probbbbbably use Date() instead to make those fields.
[20:24:27] <Joeskyyy> Then you can sort, query, etc.
[20:24:56] <BlakeRG> Joeskyyy: yeah, i realize that now.. but what kind of query would i want to run against the collection to pull the data i need out at this point
[20:25:29] <Joeskyyy> You'd need to write a script to use "/" as the separator, then sort on each block, would be how I would approach it
[20:25:46] <Joeskyyy> Since it's a string, you're kind of limited in what you can do
[20:26:08] <BlakeRG> Joeskyyy: are we talking group? map/reduce?
[20:26:14] <BlakeRG> or just a script
[20:26:22] <Joeskyyy> Just a script in your fav language :D
[20:26:38] <BlakeRG> alrighty
[20:26:54] <Joeskyyy> I'd imagine there's some JS way of doing it, but I'm no mighty JS programmer. I'd prolly look to awk/python to help me with that.
[20:27:00] <Joeskyyy> But that's just my tastebuds
[20:31:34] <BlakeRG> thanks Joeskyyy will go that route, not too hard but i thought it might be easier
[20:32:49] <pasichnyk> hey, i'm having some issues detecting if an Update() with $addToSet actually inserted a record or if the record already existed. I'm using WriteConcern "Acknowledged" and after it finished checking the DocumentsAffected and "UpdatedExisting" properties (c# driver). However if my processing errors, and restarts, i'm getting duplicate downstream processing performed that should only happen if
[20:32:49] <pasichnyk> a new item in inserted with $addToSet. Thoughts?
[20:47:42] <asturel> Joeskyyy1 then what about 512MB ram+1 core cheap do vps?:
[20:52:49] <slikts> am I right in thinking that the _id field will be indexed even if I do something like _id: String?
[20:53:09] <slikts> in mongoose
[20:59:06] <cheeser> _id is always indexed
[21:31:07] <TylerE> If I recreate a collection using $out in an aggregate pipeline, which recreates the colleciton atomically, do any indexes stick around?
[21:43:10] <TylerE> how can I splat out a date in an aggregation project
[21:43:27] <TylerE> basically i have full precision timestamps and want Y-M-D hh:00
[21:43:48] <TylerE> I tried using concat and the date operators ($year etc) but $concat refuses anythign that isn't a string
[21:43:55] <TylerE> and the date ops return integers
[21:44:56] <hydrajump> hi is it possible to access the material /videos from this course https://university.mongodb.com/courses/10gen/M101JS/2014_March/about all in one go, e.g. before the course is complete?
[22:17:04] <asturel> i keep getting this: "lastHeartbeatMessage" : "rollback 2 error RS101 reached beginning of local oplog [2]" any idea?
[23:05:23] <joannac> asturel: looks like you fell off the oplog
[23:12:56] <andrewfree> Are there plans to add back the functionality of the identity_map for mongoid in rails 4