[02:37:10] <newbie22> *: Is there a GUI interface that I can run on windows to connect to my mongo databare running on a linux server ??
[02:37:43] <IAD> newbie22: you can use rock-mongo (it's like phpmyadmin)
[02:57:58] <skot> you can take a look here for more: http://www.mongodb.org/display/DOCS/Admin+UIs
[03:13:04] <Dr{Wh0}> is it possible to do a bitwise logical find? I see updates etc but cant find examples of bit searches.
[04:43:04] <jedir0x> I have a java based web app that is using mongodb. on a specific developer's machine (osx) this app has a problem where a DBCursor returns true for "hasNext()" but throws NoSuchElementException upon calling "next()" - anyone experience anything similar?
[04:56:20] <sqwishy> If I have an document with a list in some field, how do I form my query to limit how many items of the list I obtain?
[04:58:29] <sqwishy> So in that case, should I store those items as documents in a separate collection and have them refer back like in a relational database?
[04:59:25] <Dennis-> do whatever you need. it is not supported on the backend
[06:42:02] <Gargoyle> I have an issue connecting to a replica set. Same code running mod_php 5.3.10, driver 1.3.0beta2, connecting to 2.2.0 server works OK. But on the new test platform which is php-fpm 5.4, driver 1.3.0beta2 and connecting to the same server fails with a "not master and slaveOk=false" whenever a query is attempted.
[06:43:03] <Gargoyle> This is my connection stuff:- https://gist.github.com/d6777a20bdf9d863fb1b
[06:59:58] <Gargoyle> Noiano: "initctl list |grep mongo" will show you if it is running, but I am not familiar with the correct way to disable something
[07:57:30] <Gargoyle> Derick: Hope zendcon is going well. I have another reproduceable segfault using php 5.4 fpm and the HEAD driver from git. gdb (apport) retrace leads to:- #0 mongo_deregister_callback_from_connection (connection=0x164dc40, cursor=cursor@entry=0x1d8b608) at /root/mongo-php-driver/mcon/manager.c:317
[09:39:22] <Gargoyle> If I connect to a local mongos which in turn connects to a replica set - does the driver know it's connecting to a replica set, or does it just think it's a local mongo db?
[09:40:07] <NodeX> the mongos is a router which sends the queries out and returns the data
[09:40:38] <NodeX> if you define to send/connect to a primary it will (should) connect to it
[09:41:18] <NodeX> I have recently seen some people who were having trouble connecting directly to replica sets with the PHP driver when specifying an RS
[09:41:44] <Gargoyle> NodeX: yes. seems beta 2 is borked in php 5.4
[09:41:57] <Gargoyle> HEAD works, but getting other segfaults.
[09:42:15] <Gargoyle> Which havent shown when using just a local db.
[09:45:05] <Gargoyle> updating to the HEAD of the driver solved the connection, but is randomly segfaulting. Possibly connected to timeouts or packet loss as I am connecting to the db via a vpn
[09:45:37] <NodeX> "Version 2.2 of mongos added full support for read preferences. When connecting to older mongos instances, Mongo::RP_PRIMARY_PREFERRED will send queries to secondaries. "
[09:45:51] <Gargoyle> But was thinking about looking into using a localhost mongos anyway. (I believe it will help future migration to a shard setup if needed?)
[09:46:43] <NodeX> have you tried query string http://www.php.net/manual/en/mongo.readpreferences.php
[09:46:45] <Gargoyle> ahh. right. Looks like I'll be doing a bit more reading this afternoon. :)
[09:48:19] <Gargoyle> nope. I'll wait to see if I can speak to Derick for 10 mins and see if I can dig up any useful info for him.
[09:55:16] <mcen> Anyone can help me with a mapreduce function having a collection with page views [{user_id:xxx, page:xxx},{}, {}] want to find out "also looked at" for a page.
[13:49:45] <Gargoyle> This has been running for about an hour on my MBA, and its about 1/2 way through the collection. But I know towards the end of the collection, there are a lot more items that are not images, so it should speed up.
[13:50:36] <NodeX> Gargoyle : a better way is to add them to a queue
[13:50:49] <NodeX> then they get done when it's efficient for the server
[13:51:37] <Gargoyle> NodeX: For the future, that will probably happen. For now, not so much of an issue to reside during upload.
[13:52:31] <Gargoyle> I suspect that if we could limit to a new browser, then there's probably a js + canvas script that will do it client side!
[13:53:05] <NodeX> I would hate to be one of your users lol
[13:53:13] <NodeX> using my CPU to do your work :P
[13:57:01] <Gargoyle> Think I might have missed if anyone answered this earlier. But is there a solution to needing to have more than 1 array "column" in an index?
[13:57:32] <kali> Gargoyle: it's explicitely not supported, and for very good reasons :)
[13:58:54] <Gargoyle> ok, given an example of doc = { flags: [1,2,3], other: { [{id:4},{id:5},etc] }
[13:59:41] <Gargoyle> what's the solution to indexing. Just pick the one that yeilds the lowest subset of results and then let is scan them without the second column being indexed?
[14:00:32] <kali> Gargoyle: pick the one with the widest distribution of values
[14:00:43] <kali> Gargoyle: aka the most selective one
[14:01:28] <kali> Gargoyle: there are possible optimizations that can be done with having one index on each array, but as far as i know, they're not there yet
[14:21:27] <Gargoyle> Any thoughts on what would be faster? and index on item: thing, and using an $in query to search for multi "things" or an index on item: [thing, thing, thing] ?
[14:46:15] <newbie22> *: what is the meaning of the term "single-server durability" in mongo ???
[14:47:26] <kali> newbie22: it means mongodb will use a journal on disk to avoid loosing the last minutes of writes
[14:48:47] <newbie22> *: I am new to mongodb and will most likely be asking more questions...
[15:04:48] <jordanorelli> offhand, anybody know if there's any preferred way to rename a field to _id? I have a 2m documents with a third-party ID of id instead of _id that I'd like to rename, which $rename can't do because _id is immutable so it has to create new documents. any special case for this, or just do it manually?
[15:09:41] <newbie22> *: Is there a windows GUI that I can use to connect to my mongodb running on a linux server ???
[15:10:47] <MatheusOl> newbie22: why don't you use the mongo shell?
[15:12:52] <newbie22> Matheus01: I am using the mongo shell on linux. This is just a curiostiy question ....
[16:17:57] <Gargoyle> I have setup a test server running php5.4 fpm, and using the exact same code as out live server, I had to update the driver to HEAD to get it to connect to the RS.
[16:18:18] <Gargoyle> But I seem to be able to get it to segfault quite reliably on the same page load.
[16:22:22] <Derick> mongolog::setModule( MongoLog::ALL ); MongoLog::setLevel( MongoLog::ALL ); spits out a whole load of very useful information as PHP notices (so direct to log)
[16:24:16] <Gargoyle> I can probably get a backtrace if you help me a bit. Will need to take more time getting monolog into the code and trying to make sure codeIgnigter isn't turning off logging.
[16:24:44] <Gargoyle> But I can have the same page load 2 or 3 times, and then segfault on the 4th , 5th load. Etc!
[16:25:44] <Gargoyle> Ahh. so I just shove that at the start of the front controller! :)
[16:25:58] <Derick> just do it before you do new Mongo();
[16:26:06] <Derick> otherwise we can't see everything
[16:26:46] <Gargoyle> OK, gimme 10 mins and I'll see what I can dig up.
[16:27:34] <krawek> guys what's the proper way to backup replica sets?
[16:31:56] <Gargoyle> Derick: Does MongoLog include some kind of anti-segfault code - because apart from all the php notices, the page is now loading ! :/
[16:33:52] <Gargoyle> I'm still getting things setup and I dont think the notices are being logged to file, so are you happy with the HTML source for the PHP notices?
[16:34:35] <Derick> Gargoyle: hmm, it'd be a lot easier if it was in a file
[16:34:50] <Derick> (so that I can parse and scan through it)
[16:34:57] <Derick> I would also really still like the GDB backtrace
[16:35:15] <Gargoyle> OK. I should be able to get php-fpm to log them somewhere!
[16:35:33] <Derick> set_error_log( "/var/log/errors/log" ) ought to do it
[16:35:36] <Gargoyle> I have the .crash file and have run apport-retrace -R -g _usr_sbin_php5-fpm.33.crash
[16:36:06] <krawek> Derick: is it ok to use mongodump --oplog to make a backup of a replica set db?
[16:36:34] <Derick> krawek: it depends, is that replicaset member part of the production nodes?
[16:36:42] <Derick> how much data are we speaking off?
[16:36:48] <Gargoyle> Derick: Some ubuntu program that wraps up core dumps with other info! It's given me some output (i'll pastebin), and dropped me to a gdb prompt
[16:41:18] <Gargoyle> Derick: Cool. I'll try and setup this logging properly and give it another go, as we could be attempting to load any number of images from mongoBinData fields in other requests!
[16:41:48] <krawek> Derick: I was also wondering what happen when the oplog cap is reached and then you add new nodes, would that work?
[16:41:53] <Derick> this seems to do with some issues with cursor free
[16:42:03] <Derick> bjori wrote it, so we should him have a look
[16:42:18] <Derick> krawek: new nodes do a full sync of the whole data first
[16:42:34] <krawek> great, thank you very much Derick
[16:48:56] <Derick> zakovyrya: sure, just use { 'field.nested' : 1 }
[16:49:20] <Derick> Goopyo: uh, no. MongoDB;s design is to use Memory Mapped Files
[16:49:43] <zakovyrya> Derick: Hm… what happens if I need just specific value?
[16:50:02] <Derick> zakovyrya: don't understand what you're asking now - can you give an example?
[16:50:15] <Goopyo> Derick: so fast timeseries data is a no go for mongo?
[16:51:04] <Derick> Goopyo: why wouldn't it be? What is your problem with memory mapped files?
[16:51:42] <Goopyo> Wasted ram on the timeseries over the other important data
[16:51:44] <therealkoopa> I have a question on collection layout. I have created a gist to reference: https://gist.github.com/3953966 In this example, sometimes widget 1 will need all of the gizmo information. Is it possible to run a query of the foobars collection to find the gizmo with that id, if you don't knwo the foobar id?
[16:52:08] <therealkoopa> Or is it better to store all gizmos in their own collection, and each one would hold a reference to the foobar collection
[16:52:08] <Goopyo> i'm honestly hoping you persuade me otherwise
[16:52:10] <Derick> Goopyo: ? What are you trying to get at? data overhead?
[16:52:57] <zakovyrya> Derick: Sure. Here is the results that I have to sort: http://pastie.org/5115506
[16:53:02] <Derick> therealkoopa: how many updates are we thinking about, and how many "linked" objects?
[16:53:04] <Goopyo> here let me rephrase this: would you store realtime stock data into mongodb?
[16:53:31] <Derick> zakovyrya: and what would you want to sort on?
[16:53:49] <zakovyrya> I need to sort them by "buckets.added_on" field, but only the one that matches "bucket_id": "50881d05aa50af78869c5abb"
[16:54:00] <Derick> Goopyo: That's a bit of a biased question for me - I would suggest that you try it out; and you'll probably expect it to work well
[16:54:15] <zakovyrya> Potentially there might be lots of buckets
[16:54:19] <Goopyo> Biased as in you would say you would?
[16:54:36] <Derick> zakovyrya: that I don't think you can do in one go - you would probably have to split out the buckets into it's own collection
[16:54:41] <Derick> Goopyo: I would give it a try, sure.
[16:55:15] <therealkoopa> Derick: I'm not sure, yet. I think foobar.gizmos would not be updated too frequently. There will be a lot of links to foobar.gizmo
[16:55:26] <zakovyrya> Derick: Thanks, I also thought that is too good to be true :)
[16:56:05] <zakovyrya> Derick: One more question - is it possible to do that in some kind of temporary collection?
[16:56:31] <Derick> zakovyrya: hmm, there is no such thing as a temp collection
[16:56:39] <Derick> but you can create a new one, and remove it yourself
[16:57:18] <therealkoopa> Derick: I think my approach will be fine, if it's possible to run a query to find a gizmo by its ID, outside of knowing the foobar id. Meaning, Find me this particular gizmo, but I don't know or care what foobar it's part of
[16:57:56] <Derick> therealkoopa: yes, I think so...
[16:58:00] <therealkoopa> I know I could do that easily if gizmos was its own collection
[16:58:14] <Derick> therealkoopa: I deal better with things other than "foobar" and "gizmo" :-)
[16:58:38] <Goopyo> Derick: One last thing would you index ticker and put them in one collection or would you put them in say 500 different collections (assuming you dont query across tickers)
[16:58:40] <therealkoopa> It just seems better if the gizmo is stored on the foobar in this case. I'm sorry, I tried to simplify my situation. I can come up with a better situation
[17:16:19] <jgornick> For example, let's say I have an issue document that has embeds many task documents which contain comments. Using something like db.issues.update({ "_id" : ObjectId("507ee2de2c2414a257000025") }, { $pull: { tasks: { comments: { _id: ObjectId("507ee2dd2c2414a257000019") } } } }), I would want to remove the comment who's id matches the specified id.
[17:17:11] <NodeX> you need the positional operator
[17:17:26] <NodeX> if you want to do it by finding things
[17:22:36] <jgornick> NodeX: That doesn't seem to work for me.
[17:22:54] <jgornick> Heading out to lunch… bbl.
[17:44:16] <newbie22> *: I am trying to connect to the HTTP web interface of my mongo databse. It is running on a server across the internet. Can anyone help me with this process ??
[17:50:29] <newbie22> *: Does anyone know how I can start my http web interface to run on a different port ??? "
[17:55:27] <skiz> I need to atomically insert a unique record in to a sharded collection, which is sharded on _id. However I'm getting a "For non-multi updates, must have _id or full shard key ({ _id: 1.0 })". The lookup for the existing record is based on other fields and not the shard key. Anything I'm not seeing/doing here?
[17:56:12] <MatheusOl> newbie22: when you say "my http web interface", are talking about what exactly?
[18:17:26] <newbie22> Matheus01: Thank you...... I have posted the question on "https://groups.google.com/forum/#!forum/mongodb-user"
[18:19:59] <newbie22> Matheus01: The answer should be in the mongodb.config file.
[18:20:36] <MatheusOl> newbie22: there is really no way to that, it's hard-coded at ./src/mongo/db/dbwebserver.cpp, line 531 (version 2.2.0): const int p = cmdLine.port + 1000;
[18:21:43] <newbie22> Matheus01: OK, that is great to know... I am learning and asking questions as I go.
[18:23:00] <MatheusOl> I think it's a bad thing to MongoDB
[18:23:29] <ashley_w> what does "If the first key is not present in the query, the index will only be used if hinted explicitly." mean from http://www.mongodb.org/display/DOCS/Indexes#Indexes-CompoundKeys ?
[18:24:11] <NodeX> means a compound key on a & b and a query on "b" must be hinted
[18:24:13] <newbie22> Yeah, if that is the way it is, ,,,,,,,,,,,, The so be it... I am moving on..
[18:26:58] <newbie22> Matheus01: I have just finished "The Little MongoDB Book", by Karl Seguin. I am looking for a good tutorial to start with for Mongo (pdf or http). DO YOU HAVE AN SUGGESTIONS ?????
[18:29:39] <ashley_w> newbie22: i did the TRY IT OUT on http://www.mongodb.org/ and then jumped into production code
[18:29:46] <rowanu> got a server-side JS + sharded db question: if i want to run a script as close as possible to my sharded db, do i need to do it through a mongos process (which is connecting to all the shards), or can i just connect to one of the shards' mongod processes and run the script there?
[18:34:45] <newbie22> ashley_w: I am sorry, but I am not clear on what you are speaking on.
[18:35:11] <ashley_w> go to that site, click on that text, follow the instructions
[18:36:20] <ashley_w> i've read docs as i've gone along, which doesn't make for knowing the best way to use mongodb, but it works for our use case
[19:05:40] <Dr{Wh0}> any suggetions on a good key to use for sharding? I am testing simple stuff like a value from 0-15 but the distribution is not even when it creates the shard ranges. Can I control the ranges it creates?
[19:08:16] <Dr{Wh0}> http://pastebin.com/Tt8HR3H2 <- this is how it split it up.
[19:10:00] <Zelest> when using GridFS, can one use '/' in the filename? like, create fake directories and such?
[19:13:02] <Dr{Wh0}> Zelest: afaik the path is just meta data you can make it what ever you want.
[21:29:51] <brandon-dacrib> is there a way for me to check the status of the replication to a new node that I have just added to a replica set?
[21:30:14] <brandon-dacrib> I basically want to sort out how long it will take before the data is replicated over
[21:44:23] <unknet> what performs better in a sharded mongodb environment?: query a collection looking all members with the same owner_id or query a collection giving a list containing a limited number of _id of members of that collection?
[23:10:19] <Dr{Wh0}> trying to test sharding and see how it scales but I am not getting expected results. I have 4 shards setup and if I run my test insert app to add 5m rows as fast as possible I get 120k/s inserts if I direct each app to a specific shard. If I run just 2 apps connected to 2 separate routers connected to a shareded collection where I see "ok" distribution I end up with about 30k/s so it seems as if it does not scale correctly. Where could the bottleneck be?
[23:10:21] <Dr{Wh0}> I tried with 1 router or 2 routers I have 3 config servers.
[23:56:07] <jordanorelli> is it possible to run a query on just the data that's in memory?
[23:56:22] <jordanorelli> like, "query for this, but don't do a tablescan, and return what you've found so far".
[23:57:00] <jordanorelli> so that if my data is not all in memory, i can still query it safely, but without setting notablescan for the whole database. i just have one query that i want tablescans prevented on.
[23:57:33] <doxavore> Has anyone had luck using the ruby driver's pool_size config under JRuby? I seem to be getting a lot of errors around checking out connections under load.