[00:06:42] <zfjohnny> I’m using PHP’s Doctrine ODM and it logs the queries it’s sending to MongoDB. I see a flurry of activity on the PHP side but on the Mongo side, there is no activity. Something isn’t quite right.
[00:07:37] <zfjohnny> However, I am sure that it’s connecting to my dev Mongo DB because while I’m smoke testing my project, I can see the log lines about the mongo connections
[00:07:45] <zfjohnny> Wed Sep 10 00:01:01.299 [initandlisten] connection accepted from xxx.xx.0.11:60056 #7 (6 connections now open)
[00:08:59] <joannac> zfjohnny: i just tried it in the shell, works for me
[00:22:14] <joannac> I'm not aware of anything like a "stealth mode"
[00:22:21] <zfjohnny> Could it be that it only logs for statements which trigger a disk read but that items already in memory do not have log lines generated?
[00:24:20] <joannac> you can see it works because you tested it in the shell
[00:26:28] <joannac> as a test, do an insert, and try the query in PHP again, and make sure it is connecting and gets the new document?
[00:27:34] <zfjohnny> http://docs.mongodb.org/manual/reference/configuration-options/#operationProfiling.mode seems interesting although no matter what I try, my server doesnt start when I try to add mode into my mongo config file
[00:27:43] <zfjohnny> operationProfiling.mode = all
[00:27:52] <zfjohnny> mongo crashes on start if i add that
[00:36:08] <zfjohnny> No i mean, it only *logs* something the first time i do a “show dbs;”… every other time I run “show dbs;” nothing is added to the mongo log.
[01:44:53] <deerfo> If the 'profile' object already exists in the found document with different properties, how do I add the new properties to it, without overwriting the entire profile object? User.findOneAndUpdate({username: req.user.aud}, {$set: {"profile": {"name": "Sally", "surname": "Smith"}}}, {});
[01:45:39] <deerfo> if profile has "age" and "gender" already, they're overwritten with "name and "surname". I'd like to insert or replace rather than replace *entirely*
[01:48:31] <deerfo> joannac - '{"profile": {"name": "Sally", "surname": "Smith"}}' is in fact 'req.body', it's what's being sent by the client to the server
[01:48:44] <deerfo> are they able to send in that 'profile.name' format?
[01:50:29] <deerfo> well i'm trying to make a REST API, so I'm getting get and post requests from users, sometimes with a text body, sometimes with a multipart body
[01:51:23] <joannac> deerfo: okay, so it's your code? So you can rewrite the request...
[01:52:57] <deerfo> joannac - ah yes. i see what you mean now. apologies. thank you!
[02:12:58] <deerfo> joannac - if i use .findOneAndUpdate, and I receive profile.age = "" from the client, is there an easy way to remove .age from profile, rather than doing nothing?
[06:07:30] <pranam> how to implement a connection pool in mongodb
[06:15:15] <Boomtime> @pranam: all official mongodb drivers have a connection pool already
[06:17:59] <pranam> @Boomtime: so we dont need any sort of connection pool of our own and can rely on the official mongodb driver
[06:18:06] <pranam> @Boomtime: so we dont need any sort of connection pool of our own and can rely on the official mongodb driver?
[06:21:09] <Boomtime> @pranam: assuming you use an officially supported driver, yes
[07:04:07] <asdfasdf> i have a collection with geojson Polygons
[07:04:15] <asdfasdf> and i have another collection with geojson Points
[07:05:01] <asdfasdf> for each point, i want to determine which polygon it lives in.
[07:06:26] <asdfasdf> the $geoWithin seems to query on a particular object
[07:06:33] <asdfasdf> rather than the whole collection.
[07:06:40] <asdfasdf> is there a more efficient way to do this?
[07:59:51] <roxlu> hi guys, I've got a mongodb with about 160.000 records but the cpu keeps increasing linearly. When we reach 300.000 entries the cpu is 70-90%. We're using this query (all columns are indexed) https://gist.github.com/roxlu/951a049dad82e6d13f12
[08:19:10] <sheldonh> when i add members to a replica set, will mongo leverage DNS SRV records to find the tcp port number?
[09:47:57] <CaShY> Hi, is it possible to do an aggregate on another collection on a virtual value? sort of like this http://pastie.org/9541580
[11:08:41] <fontanon> Hi Everybody! How can I display datetimes stored as strings (i.e. '2014-03-01 10:00:00') as numeric timestamps (i.e. 1136005200000)
[11:15:40] <fontanon> I mean to use some mongodb internal function to convert dates stored in string format to unix timestamps
[11:54:23] <nofxx> Ok, after the last day debugging and (not yet 100%) fixing ip, ipv6, dns thing was causing massive slow down, from 30s got to 5s, to 1s, to the usual 0.5s
[11:54:39] <nofxx> Was experimenting now with adding static IPs, all my servers on each /etc/hosts ...
[11:58:23] <fontanon> Hi Everybody! How can I display datetimes stored as strings (i.e. '2014-03-01 10:00:00') as numeric timestamps (i.e. 1136005200000) ?? I mean to use some mongodb internal function to convert dates stored in string format to unix timestamps
[12:01:47] <nofxx> fontanon, problably there is but have in mind mongo philosophy is dumb db, logic on the app
[12:06:10] <nofxx> hopefully it'll work in the future heh
[14:36:50] <rpage> hello all, i have a question on backgroun indexing? is it alway recommanded to do background indexing via foreground? i notice we are using foreground by default and need to purpose a action plan
[14:39:04] <rpage> Devs were in the middle of a massive document remove and re-import which cause replication lag
[14:40:01] <rpage> and notice the error [journal] DR101 Latencywarning journal
[15:06:45] <godelmang> hi all, im trying to return an element of an array that is a subdocument of mongodb collection of mine. the $slice operator seems appropriate? db.mycoll.find({},{_id:0,"foo.bar":{$slice[2,1]}}) seems like it should work, but it doesn't.
[15:07:54] <godelmang> db.mycoll.find({},{_id:0,"foo.bar":1}) however does return the whole array as a subdocument
[15:14:53] <godelmang> the .find() with the $slice operator is simply returning the entire collection.
[15:28:38] <Boomtime> @godelmang: both of the find() statements you pasted are returning the entire collection
[15:29:15] <Boomtime> db.mycoll.find({}, ... <- that first set of empty braces means "everything"
[15:30:25] <Boomtime> meanwhile, i'm not sure what you are attempting to do but i do not believe $slice is valid in a simple find
[15:33:30] <Boomtime> -> db.mycoll.find({},{_id:0,"foo.bar":{$slice[2,1]}}) <- i assume there is a typo here, $slice should be followed by :
[15:36:02] <Boomtime> this will scan every single document in the collection, but the returned documents will contain only the 3rd element of the "foo.bar" subdocument from each source document
[16:05:42] <emfl_> Hello, I'm having a hard time installing mongo gem on windows 2012. It's complaining about missing sasl.h file. Does that ring a bell to anyone ?
[16:48:23] <geoffeg> I used to know what "fastmodinsert" meant in the profiling log but I've forgotten and google isn't helping.
[17:07:34] <pasichnyk> I have a production issue and i'm looking for some ideas on how to best restore a few collections in a database from a lvm2 snapshot backup. Is it possible to somehow put all the database file (renamed) in the data folder and have hte db load up the old copy as a new database name, so data can be selectively migrated over to the production database?
[17:24:46] <Acute_Angle> I am new to mongodb. I have been asked to rename some keys in one of our collections but am having trouble getting it to work.
[17:34:41] <pasichnyk> Or, if i have a copy of the files on disk, i can probably use mongoexport with --dbpath and --collection to export the data i need, eh?
[17:37:57] <Acute_Angle> I was trying to do something like: