PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 17th of October, 2012

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[02:34:54] <Ephexeve> Anyone uses Mongodb on archlinux?
[07:30:17] <[AD]Turbo> hola
[08:50:16] <SeySayux> Hi, does anyone have experience with a good admin UI? I've found this page: http://www.mongodb.org/display/DOCS/Admin+UIs and it seems there's quite a lot of choice. Any recommendations in particular?
[09:01:57] <samurai2> Humongous
[09:53:01] <FrenkyNet> SeySayux: I think those will pop up more and more as webhosts will include it more, I haven't found one that is really pleasing
[09:54:30] <SeySayux> I'm just toying around with MongoDB (I don't have any experience at all, besides installing it through homebrew), just installed RockMongo, looks good to me.
[09:55:02] <ron> RockMongo is fair, but it has a few.. hmm.. less than perfect things in it.
[09:55:09] <ron> But for starting it's enough.
[09:59:38] <SeySayux> Well, besides that whoever made it has absolutely no taste in fonts (Courier? Seriously?) nothing so far that a few lines of CSS couldn't resolve :P
[10:54:45] <timroes> Somehow the java driver fails to save an ArrayList<DBRef>, Howcan I save an array of references to other documents with the java driver? Thanks for your help :)
[10:56:21] <ron> define 'fails'.
[10:57:31] <timroes> Exception in thread "main" java.lang.IllegalArgumentException: can't serialize class de.inovex.test.Client
[10:57:52] <timroes> i transfered this class to an DBObject and put that into the save method
[10:58:24] <timroes> and inside the dbobject i put one value that is an ArrayList<DBRef>
[10:58:26] <ron> but it says that Client isn't serializable :)
[10:58:37] <timroes> i know, and wonder myself about it right now :D
[10:58:56] <timroes> DBObject dbobj = objectConverter.encode(obj);
[10:58:56] <timroes> db.getCollection(getCollectionForClass(obj.getClass())).save(dbobj);
[10:59:26] <timroes> thanks dude
[10:59:31] <timroes> i will put it to my nice hat collection
[11:00:43] <timroes> okay somehow i made garbage with the list, and i put some client instance in my dbobject where an int array should be :D
[11:01:42] <timroes> yeah now it works :)
[11:02:43] <timroes> so beautiful, never seen something so beautiful :') an json array of reference id's to another json document, thanks ron for the kick in the right direction :)
[11:03:03] <ron> whenever you need some kicking, you can always ask.
[11:03:12] <timroes> why do so many ppl offer that to me?
[11:03:16] <timroes> ;)
[11:54:48] <remonvv> a shapely buttocks?
[11:54:56] <remonvv> Good targets motivate.
[11:55:18] <ron> remonvv: didn't know you swing that way.
[11:55:28] <ron> not that there's anything wrong with that.
[11:56:02] <remonvv> I don't. But living in Amsterdam makes for me being somewhat of a minority when it comes to that ;)
[11:56:42] <remonvv> ron, what mapper do you currently use in your projects?
[11:59:03] <ron> remonvv: good. I wouldn't want to tip-toe around you.
[11:59:10] <ron> remonvv: Morphia, unfortunately.
[11:59:39] <remonvv> unfortunately?
[12:00:26] <ron> remonvv: yes.
[12:02:00] <remonvv> Alright. Well if you're interested; I'm in the proces of open sourcing a subset of our MongoDB toolset. Looking for a few people to review/contribute.
[12:02:26] <ron> remonvv: we talked about it in the past, let's chat about it a bit later.. going into a meeting.
[12:02:43] <remonvv> i know, ok
[12:15:25] <NodeX> open that source right up ;D
[12:50:26] <remonvv> it's already a github project. Private now though.
[12:51:18] <ppetermann> remonvv: whats your toolset doing?
[13:07:37] <algernon> remonvv: what language is the subset in?
[13:09:35] <remonvv> java
[13:09:54] <remonvv> it's a subset of our propriety libraries. I'm planning to add MongoDB based MQ and scheduling as well.
[13:10:25] <remonvv> it's a subset in that we have functionality that replaces the current AF and other features that are in the MongoDB roadmap so I've removed those.
[13:10:38] <remonvv> Currently working on code structure
[13:11:32] <remonvv> it's a refreshed version of the persistence layer of our game server and second screen server tech basically.
[13:23:29] <BlackPanx> any eta on 2.2.1 ?
[13:27:59] <remonvv> Milestone is 23 Oct
[13:35:21] <algernon> remonvv: I see. whom should I follow on github to get notified when the lib becomes public? :)
[13:39:00] <remonvv> remonvv
[13:39:18] <remonvv> I'll make it public when i'm done with the current refactor
[13:39:28] <remonvv> After that i'd much appreciate reviewers and contributors
[13:39:53] <remonvv> Especially review of usability is nice. That's the area where most Java mapping solutions struggle.
[13:40:50] <algernon> if it turns out to be something I can make use of, I'll probably start with throwing some clojure-sugar on it - that should hopefully pick up any bad usability shortcomings
[13:42:37] <remonvv> Alright, I'm looking into scala myself atm for much the same reasons
[13:49:54] <topriddy> itosting multi-part data
[13:55:47] <aster1sk> Hey mongoers, have a big problem with the latest PHP driver where all $cmd's are being sent to primary, though the docs state "all of the official drivers support full read preference mode semantics for the following commands".
[13:57:12] <aster1sk> See line 631 https://github.com/mongodb/mongo-php-driver/blob/master/db.c
[14:01:39] <aster1sk> Seems all $cmd go to "php_mongo_connection_force_primary()"
[14:13:40] <Bartzy> Hello
[14:13:46] <Bartzy> if I want to group by date
[14:13:57] <Bartzy> It would be best to have a datetime field, without time? Just date ?
[14:14:45] <kali> use a datetime with hours/mins/secs/millisec at 0
[14:14:52] <kali> midnight
[14:14:58] <Bartzy> yeah
[14:15:12] <Bartzy> so in PHP, MongoDate(strtotime('2012-05-10')) would work
[14:15:37] <kali> but also note that the Aggrgation Framework can split date fields and aggregate on them
[14:15:44] <Bartzy> So basically to group by I need to denormalize - save both timestamp and date, just like mysql ?
[14:16:00] <Bartzy> split which date fields ? day / month /year etc ?
[14:16:04] <kali> Bartzy: yes
[14:16:21] <Bartzy> and that doesn't take lots of time since it needs to do that on each document ?
[14:16:36] <Bartzy> And then the index is worthless for the grouping ?
[14:16:38] <kali> http://docs.mongodb.org/manual/reference/aggregation/#date-operators
[14:17:22] <Bartzy> kali: Yeah, but then Mongo just executes a function for each document it needs to check/group ?
[14:19:24] <kali> yes, but a relatively harmless one
[14:19:30] <kali> nothing like a JS call
[14:19:55] <Bartzy> yeah but if it needs to do that for 20 million documents - I guess that would be very time consuming ?
[14:20:13] <Bartzy> Instead of just using the index if it had a designated field for that ?
[14:22:02] <kali> Bartzy: well, if you use group, you're running a javascript function. this is terribly slow
[14:22:26] <kali> Bartzy: and you can still use the index to filter what goes through the aggregation
[14:22:41] <Bartzy> I'm coming from MySQL - where if you have only a timestamp field and need to group by the date alone, you will do GROUP BY DATE(timestamp) - which is very slow.
[14:22:55] <Bartzy> and if you have a date field, you can just do GROUP BY date, and if you have an index on date that would be very fast.
[14:23:02] <Bartzy> The same concept goes for MongoDB ?
[14:23:12] <NodeX> no
[14:23:26] <Bartzy> Can you explain ?
[14:23:37] <NodeX> explain what#
[14:23:38] <NodeX> ?
[14:23:48] <Bartzy> Why not ?
[14:23:58] <kali> Bartzy: mysql will be fast on select count(*), g group by g where g is indexed. but mongo does not have yet the right optimisation in indexes to run fast counts
[14:24:01] <NodeX> what do you want explaining?
[14:24:36] <Bartzy> kali: So what can I do to get that functionality ? wait for it ..? :)
[14:25:03] <kali> Bartzy: it's supposed to be in the pipe for 2.3/2.4
[14:25:04] <Bartzy> NodeX: If I should denormalize and have both 'date' and 'timestamp' fields, because I need to group by 'date' fast.
[14:25:22] <kali> Bartzy: https://jira.mongodb.org/browse/SERVER-1752
[14:25:28] <NodeX> barzty : that's up to you, it's your app, you decide
[14:25:31] <Bartzy> kali: So the answer for my question ^ is yes from 2.4 and onwards ?
[14:25:52] <Bartzy> Oh really I thought you'll decide for me :)
[14:25:55] <kali> hopefully
[14:26:18] <Bartzy> kali: So I should start saving both date and the date+time?
[14:26:22] <Bartzy> in separate fields
[14:26:42] <NodeX> No, you can pay 10gen for support and they can advise :
[14:26:44] <NodeX> 1:)
[14:27:01] <_m> MMS rocks. =)
[14:27:26] <Bartzy> kali? :)
[14:27:30] <kali> Bartzy: that's not a decision for me to make
[14:29:11] <Bartzy> kali: I just want to understand if after fixing case #SERVER-1752, the behavior will be the same as what I described in MySQL?
[14:29:48] <felipeelias> hey everyone
[14:29:58] <kali> Bartzy: you know as much as I do at this point.
[14:31:15] <NodeX> it will never be as fast as count() because count() uses internal counters
[14:31:28] <NodeX> find({}).count() **
[14:31:46] <kali> +1 on this )
[14:32:31] <Bartzy> I have another question, about the PHP driver - When will I get ok:0 and not an exception thrown ?
[14:32:49] <NodeX> ok:0 from where?
[14:33:02] <Bartzy> from insert/update/find...
[14:33:19] <NodeX> in what scenario?
[14:33:27] <NodeX> a bad query or what?
[14:33:40] <Bartzy> in the PHP driver, for example in MongoCollection::insert, the docs describe that you can get a status array as a return value, with the 'ok' key.
[14:34:11] <Bartzy> Yeah - bad query, duplicate value on unique index.. all kinds of stuff - when it will not raise an exception, and instead just flag 'ok' as 0 ?
[14:34:42] <Bartzy> It would be easier to assume that if an exception was not raised, the action went through fine...
[14:34:47] <NodeX> because it's not an exception to raise, use getLastError
[14:35:00] <NodeX> or lastError, ... i forget which
[14:35:21] <_m> Or turn 'safe mode' on for those queries
[14:35:26] <aster1sk> Aggregate read preference is broken.... You cann not RP_SECONDARY with the aggregation framework. https://github.com/mongodb/mongo-php-driver/blob/master/mongo.c
[14:35:30] <_m> (Not sure if that's possible with the PHP driver.)
[14:36:04] <Bartzy> _m: It is possible, and I'm using safe mode.
[14:36:11] <NodeX> safe mode will wait for a write to happen but it still wont raise an exception
[14:36:19] <_m> Ahh.
[14:36:27] <Bartzy> Nodex: In case of a duplicate unique index, it will
[14:36:37] <Bartzy> http://www.php.net/manual/en/class.mongocursorexception.php
[14:36:42] <NodeX> so what's the problem then?
[14:36:55] <NodeX> one minute you say it doesn't then you say it does ... I'm confused?
[14:36:56] <Bartzy> I'm asking when it will not raise an exception, but still fail (i.e. 'ok' returns as 0)
[14:37:12] <NodeX> try{}catch(){}...
[14:37:14] <Bartzy> You need to read what I wrote again
[14:49:20] <Bartzy> NodeX: I think I understood...
[14:49:50] <Bartzy> NodeX: http://www.php.net/manual/en/mongocollection.insert.php , the return 'status' array described there - it's relevant only if you have PHP configured to not raise a FATAL error if an exception was not catched ?
[14:50:26] <Bartzy> and then you can continue after the exception was thrown (and not catched), and check the status array - instead of using exceptions and try-catch blocks ?
[15:03:14] <NodeX> if you try{}/catch everything then you can log anythign that goes wrong
[15:03:25] <NodeX> and an error will not be raised in your app for your users to see
[15:36:39] <wzlwzl> for ttl collections, when i do a fineOne in the console… i can use any field that is ISODate, right?
[15:36:49] <wzlwzl> (as the ttl field)
[15:37:02] <wzlwzl> "dt" : ISODate("2012-09-13T07:22:04.585Z"),
[16:01:36] <dizzy57> Hi, guys. I'm using the python driver and want to create a connection pool without actually connecting (let's say the network is down at the moment). Is pymongo.Connection(_connect=False) safe to use? Is this option supported?
[16:23:28] <cybertoast> is there a way to get password prompt when running a mongo command-line script? for example, `mongo dbname -u username mongoscript.js` does not prompt for password. i've also tried with --username. if i provide the -p option it thinks i'm passing it on the command-line (ie `mongo dbname -u username -p scriptname.js` thinks scriptname.js is the password)
[16:23:47] <cybertoast> this is on OSX with shell version 2.2.0
[16:28:26] <finalspy> hi, anyone knows if there's a way to create a replicaset without restarting a mongo instance ?
[16:39:34] <kali> finalspy: to move from standalone to replica, you need to restart
[16:42:01] <keras> cybertoast: no idea about mongo, but maybe you could create a sh wrapper for that?
[16:43:14] <kenyabob> new to mongodb — whats the function I want to get all the categories from a set of documents?
[16:44:29] <cybertoast> keras, the mongo client allows me to prompt for password if i have the -p option though. i'm just curious about why this doc seems wrong: http://docs.mongodb.org/manual/reference/mongo/
[16:44:50] <cybertoast> kras, specifically this "If you specify a --username without the mongo --password option, mongo will prompt for a password interactively". that's what's not happening for me
[16:44:58] <cybertoast> the "will prompt for a password" part
[16:59:18] <jawr> can anyone help me to understand this error: field not found, expected type 2
[16:59:45] <jawr> i get it when trying to acess a BSONObj
[17:52:13] <kenyabob> lets say I have a hundred songs in a db, and I want to compile all the unique genres for the songs, what would be the quickest way to accomplish that
[17:53:41] <kali> aggregation framework probably
[17:53:58] <kali> (i should make a macro at some point)
[18:10:01] <kenyabob> kali: would that be more simple than a map reduce
[18:11:09] <kali> kenyabob: yes, and more efficient too
[18:20:03] <huhuhul> hi, why does ttl collection doesn't work? http://dpaste.org/euSEt/
[18:20:08] <huhuhul> (i use 2.2.0)
[18:30:20] <kenyabob> kali: why can't I just use .distinct()?
[18:30:24] <kali> huhuhul: the date is 12 hours into the future...
[18:30:58] <kali> huhuhul: or 6 or 8
[18:31:29] <kali> kenyabob: because it does not work in sharded configuration
[18:31:44] <huhuhul> kali: i live in different timezone as you ;)
[18:31:53] <kali> huhuhul: utc is utc
[18:32:05] <huhuhul> kali: ouch, thank you mate!
[18:32:24] <kali> huhuhul: Z means utc
[18:50:25] <ismarc> Hey folks, I'm having a heck of a time with 2.2.0 trying to run a mapreduce into a sharded collection
[18:51:41] <ismarc> there are 8 shards, on 3 of the shards it runs through all 3 phases and looks like it completes fine. On 5 of the shards, it runs through 2 of the phases and then on the 3rd, there aren't any messages about it at all, it's no longer listed in the currentOp() output and it seems the data from those shards is just gone
[18:52:18] <ismarc> Anyone have any idea where I can look to get more info? mongos and mongod logs don't show anything different except the lack of the 3rd phase running
[18:56:24] <ismarc> Has anyone here successfully done a mapreduce into a sharded collection?
[19:13:55] <aster1sk> Created : https://jira.mongodb.org/browse/PHP-535
[19:14:05] <[raymond]> I'm trying to export a collection using: "mongoexport --db website --collection users --csv --out /tmp/users.csv" but I'm getting the error "assertion: 9998 you need to specify fields"
[19:14:40] <[raymond]> From the documentation it looks like I shouldsn't need to provide a field list, am I reading it incorrectly?
[19:17:16] <syskk> let's say i have a collection posts that have this kind of documents: {body: 'some text', comment: [ {_user: '324', text: 'some comment'} ]}
[19:17:37] <syskk> how can i remove every object in the comment array where _user = 324 ?
[19:17:43] <syskk> is that possible?
[19:18:03] <syskk> i guess that would be done with update but not sure how
[19:18:46] <aster1sk> a = db.thing.find({'comment.user':324})
[19:19:07] <aster1sk> OH wait sorry.
[19:19:21] <aster1sk> I was going to suggest using positional operator.
[19:19:43] <aster1sk> Let me test my theory
[19:21:38] <aster1sk> Actually you can just db.thing.remove({'comment.user' : 324})
[19:21:41] <aster1sk> Tested, success.
[19:23:23] <aster1sk> syskk: hope that helps.
[19:24:17] <syskk> wow that'd be awesome let me try that
[19:24:33] <syskk> does it remove the whole 'thing' or just the comment
[19:24:43] <syskk> i only want to remove the comment :/
[19:24:50] <aster1sk> Ahh ok.
[19:25:04] <aster1sk> That's totally possible.
[19:25:17] <aster1sk> It will be an update though.
[19:25:42] <aster1sk> You'll want to use $pull I believe http://www.mongodb.org/display/DOCS/Updating#Updating-%24pop
[19:28:55] <syskk> cool
[19:29:00] <aster1sk> Got it working?
[19:29:03] <syskk> aster1sk: you spot anything wrong with this? db.eatings.update({'comments._user': ObjectId("507efe91b84ba32892000004")}, {$pull: {'comments._user': ObjectId("507efe91b84ba32892000004")}});
[19:29:34] <syskk> doesn't remove anything
[19:30:15] <aster1sk> Hmm don't think _user will match that Object id.
[19:30:45] <aster1sk> As I said earlier, this looks like a job for the $ positional operator.
[19:31:08] <wereHamster> syskk: http://www.mongodb.org/display/DOCS/Updating#Updating-%24pull
[19:32:06] <wereHamster> syskk: is 'comments' an array of {_user:X, ...} embedded documents?
[19:32:08] <aster1sk> db.eatings.update( { 'comment._user' : 1 }, { $pull : { 'comment.$.comment' : <not empty> } }
[19:32:21] <aster1sk> That's what it looks like wereHamster
[19:32:28] <syskk> also tried: db.eatings.update({'comments._user': ObjectId("507efe91b84ba32892000004")}, {$pull: {'comments': {'_user': ObjectId("507efe91b84ba32892000004")}}});
[19:32:31] <wereHamster> { $pull : { field : {field2: value} } } removes array elements with field2 matching value
[19:32:43] <syskk> ah
[19:32:59] <wereHamster> syskk: first of all, does db.eatings.find({'comments._user':ObjectId("507efe91b84ba32892000004")}) return any documents?
[19:33:17] <syskk> no comments is an array of {_user: userid…, text: ""}
[19:33:26] <syskk> yes it does wereHamster
[19:35:30] <wereHamster> syskk: http://pastie.org/5074857
[19:35:43] <syskk> https://gist.github.com/3907613
[19:36:36] <syskk> mmmm interesting!
[19:37:01] <syskk> would help a lot if i had syntax highlighting in the mongo shell :(
[19:38:23] <syskk> damn it, found my bug
[19:38:39] <syskk> $pull: {'comments': {'_user':
[19:38:42] <syskk> should be
[19:38:49] <syskk> $pull: {comments: {_user:
[19:39:01] <syskk> well it seems unquoting fixed the problem
[19:39:28] <syskk> on a related not, i have no idea when to quote or not
[19:39:42] <wereHamster> that shouldn't matter.
[19:40:04] <wereHamster> both are equivalent javascript
[19:43:09] <syskk> that's weird, im almost definitely sure that's the only thing i changed
[19:43:17] <syskk> will test some more
[19:44:45] <syskk> nope, it wasn't the quotes. damn it
[19:44:52] <syskk> i have no idea what i did :(
[19:44:59] <wereHamster> run 'git diff' and you'll see what you did
[19:54:34] <pmoraes> morning!
[19:58:31] <syskk> well was just playing in the mongo console
[19:58:46] <syskk> anyways, problem fixed now, thanks a lot wereHamster and aster1sk
[20:01:27] <aster1sk> Anytime yo.
[20:03:39] <pmoraes> how can I have a EmbedMany with more than one possible document?
[20:12:46] <jgornick> hey guys, in 2.2, can you now query other collections in a map/reduce job?
[20:25:36] <Alexandro> Good Afternoon I am facing a big problem with my mongo system, this seemed to happen all of the sudden, when I access any of my mongos app servers and try to execute a query I would get an error message like this: error: { "$err" : "can't find shard for: mongoshard1:27017", "code" : 13129 } can any of you help me solve this?
[20:29:20] <Alexandro> Please, I would really appreciate your help.
[20:39:01] <Alexandro> Good Afternoon I am facing a big problem with my mongo system, this seemed to happen all of the sudden, when I access any of my mongos app servers and try to execute a query I would get an error message like this: error: { "$err" : "can't find shard for: mongoshard1:27017", "code" : 13129 } can any of you help me solve this?
[20:58:32] <amontalenti> what's the easiest way to find outlier large documents in a MongoDB collection?
[21:17:23] <Alexandro> I have a mongo configuration like this:
[21:17:23] <Alexandro> -3 config servers
[21:17:23] <Alexandro> -3 shard servers
[21:17:23] <Alexandro> -5 mongos app servers
[21:17:23] <Alexandro> The problem I am facing is that not so long ago something happened and the mongos (app servers) were not able any more to get results from queries, when doing this commands an error message appears:
[21:17:24] <Alexandro> mongos> use mentez_data
[21:17:25] <Alexandro> switched to db mentez_data
[21:17:25] <Alexandro> mongos> db.facebook_user.find();
[21:17:26] <Alexandro> error: { "$err" : "can't find shard for: mongoshard1:27017", "code" : 13129 }
[21:17:45] <Alexandro> Can anyone please help me? I would really appreciate it thank you!
[21:22:27] <Gargoyle> Alexandro: When you say 3 shard servers, do you mean 3 shard replica sets?
[21:23:18] <Gargoyle> Or just 3 pysical machines?
[21:23:44] <Alexandro> no, no replicas, just 3 physical machines
[21:23:48] <Alexandro> configsvr> db.shards.find();
[21:23:48] <Alexandro> { "_id" : "shard0000", "host" : "mongoshardoriginal" }
[21:23:48] <Alexandro> { "_id" : "shard0001", "host" : "mongoshard1" }
[21:23:48] <Alexandro> { "_id" : "shard0002", "host" : "mongoshard3" }
[21:25:02] <mmercer> hey guys
[21:25:18] <mmercer> trying to enable sharding on a db... and it returns a reference error: db is not dfined (shell):1
[21:25:23] <mmercer> why cant i enable sharding :|
[21:25:24] <Gargoyle> I guess the best option is to check that you can connect to it via the name:port in the config. However, shards are not fault tolerant unless each shard is a replica set.
[21:25:45] <Gargoyle> ^^ Alexandro
[21:25:46] <mmercer> ( command used is sh.enableSharding(db)
[21:27:26] <Gargoyle> Alexandro: Please do not PM without asking.
[21:28:04] <Gargoyle> Alexandro: If one of your shard nodes fails, you lose that chunk of data!
[21:28:56] <Alexandro> Sorry about that didn't want to confuse, agree but I am able to connect to the actual shards, the problem is with the mongos they return that error of not seeing the shards
[21:29:55] <Gargoyle> Alexandro: Have you tested the connection from the actual machine that mongos is running on?
[21:31:28] <Alexandro> yes I did, "mongo —host mongoshard1" works fine
[21:32:19] <Alexandro> but running "mongo" will open mongos and in there Ill get the error
[21:41:33] <mmercer> hey guys... i just did a db.runcommand("listCommands") on a 2.07 machine... and its missing enablesharding...
[21:41:46] <mmercer> is this a known bug or something ? i cant find any references to why i cant do sharding on it
[22:16:40] <mmercer> wth... where the hell is the enablesharding command
[22:21:59] <bhosie> i think i may have found a bug in the php driver, but wanted to confirm i'm doing this right. trying to do a bulk insert and utilize the continueOnError flag in php. shouldn't this example insert docs 0 and 2? it's throwing an exception and not inserting anything http://pastebin.com/iDz5GM5G
[22:23:03] <Gargoyle> bhosie: What versions of PHP, Driver and Mongo ?
[22:24:54] <bhosie> Gargoyle: this is mongo 2.2 and php driver 1.2.12, php 5.3.10
[22:26:00] <Gargoyle> You might want to double check your results using the 1.3.0beta2 driver from github. There's been a lot of improvements.
[22:26:56] <bhosie> Gargoyle: ok i'll fire up an instance and try that. i was trying to use the 1.3.x driver but it's definitely not production ready so i need 1.2 for now
[22:27:32] <Gargoyle> bhosie: Been using the 1.3.x code in production for about 6 weeks I think! :)
[22:28:47] <bhosie> Gargoyle: how about with a replica set? any issues, i seem to remember it not connecting properly a couple of weeks ago. may have had updates since then though...
[22:29:08] <Gargoyle> bhosie: Yes, replica set.
[22:29:23] <Gargoyle> bhosie: Using the 1.3.0beta2 tag, and not HEAD.
[22:30:31] <bhosie> hmm... ok. yeah, let me try this bulk insert with that driver and i'll report back
[22:33:20] <bhosie> Gargoyle: k so i did pecl install mongo-beta restarted apache and i'm still having the same issue. exception thrown and no docs inserted
[22:34:14] <Gargoyle> What version does that show?
[22:34:52] <Gargoyle> I clone from github and compile the module manually, not using pecl.
[22:35:36] <bhosie> mongo 1.3.0beta2
[22:35:46] <bhosie> http://pecl.php.net/package/mongo
[22:36:48] <bhosie> how could i test a batch insert on the shell? the docs say you can do it on 2.2+ but there are no examples
[22:37:25] <bhosie> i tried this: db.test.insert( {{'test1' : 'hello'},{'' : 'length'},{'test2' : 'hello'}}, {'continueOnError' : TRUE})
[22:38:26] <Gargoyle> bhosie: I would have thought the outer braces would need to be [] at least.
[22:39:07] <Gargoyle> [ {obj}, {obj},… , etc ]
[22:39:33] <bhosie> yeah that does it :)
[22:41:00] <bhosie> ok, now i'm really confused. that call inserted doc[1]. i thought zero-length keys weren't allowed?? http://pastebin.com/FFWZF0Kt
[22:55:21] <jrdn> how can we check if a background index is completed?
[23:34:22] <Notionwork> Hello there everyone!
[23:34:48] <Notionwork> I had a question for you folks if anyone is willing to help.
[23:35:38] <Notionwork> I just installed mongodb and I'm loving it! I've been playing around in the command line through terminal, but I can't seem to get mongo to work through PHP.
[23:37:08] <BurtyB> Notionwork, have you got the PECL module compiled/installed ok?
[23:37:24] <Notionwork> I keep getting Class 'Mongo' not found errors when I try to connect to it
[23:37:28] <Notionwork> I'm on Mac OSx
[23:37:30] <Notionwork> Btw
[23:37:43] <Notionwork> I downloaded the mongo.so from github
[23:38:00] <Notionwork> And placed it in my mamp php extensions folder
[23:38:03] <BurtyB> and enabled it in your php.ini? does it show OK in a phpinfo ?
[23:38:23] <Notionwork> I placed it in the php.ini but I haven't checked the phpinfo
[23:38:28] <Notionwork> How would one do that>
[23:38:29] <Notionwork> ?
[23:39:37] <BurtyB> a simple php file with "<?php phpinfo();" in should show it
[23:40:29] <Notionwork> Lemme check the phpinfo and I'll get right back to you
[23:42:32] <Notionwork> Alright so I fired up the phpinfo() command but where would I look to find the loaded extensions?
[23:43:16] <BurtyB> Notionwork, you should see a heading "mongo"
[23:44:12] <Notionwork> Would that be under the loaded modules section of the apache2handler?
[23:44:44] <Notionwork> Because if it is, it's not there. I tried searching the page for mongo as well to no avail.
[23:46:40] <BurtyB> Notionwork, if it's not in there then you need to check your php.ini and any error logs to see why it didn't load - not sure where these are on osx tho
[23:47:33] <Notionwork> Yup it's not there. I double checked that the correct php.ini (according to the loaded php.ini field in the phpinfo command output) and I have extension=mongo.so in there...
[23:47:42] <Notionwork> I'll check the error log
[23:47:45] <Notionwork> Hold up a sec
[23:49:08] <Notionwork> Alright so I stopped and started my apache server and this was the output: [17-Oct-2012 23:46:29 UTC] PHP Warning: PHP Startup: mongo: Unable to initialize module
[23:49:09] <Notionwork> Module compiled with module API=20090626
[23:49:10] <Notionwork> PHP compiled with module API=20100525
[23:49:11] <Notionwork> These options need to match
[23:49:12] <Notionwork> in Unknown on line 0