PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 5th of October, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[02:05:38] <Zodd> hello
[02:05:46] <Zodd> anyone's here?
[04:30:50] <amitprakash> Hi, I am getting cannot open /dev/urandom Too many open files in mongodb logs post which mongod crashes
[04:31:08] <amitprakash> ulimit -n is set to 65536
[04:31:28] <joannac> find the pid of mongod
[04:31:34] <joannac> then cat /proc/PID/limits
[04:32:10] <amitprakash> oh dear
[04:32:20] <amitprakash> that has a limit of only 1024
[04:32:28] <amitprakash> what gives?
[04:32:32] <joannac> right, so fix your limits
[04:32:57] <joannac> https://docs.mongodb.com/manual/reference/ulimit/
[04:33:02] <amitprakash> How do I go about doing this.. the ubuntu wiki seems down for me to be able to find what the limit stanza is
[04:34:15] <amitprakash> finally, I am launching the service via systemctl with this service file
[04:34:15] <amitprakash> https://bpaste.net/show/fb21bc55b15e
[09:04:32] <iiro> Hi everyone. About locking the Mongo with fsynclock when doing backup - the Mongo's official documentation (between versions 2.2 and 3.0) that there's no need for that when doing mongodump - but the current documentation for 3.X versions says nothing about this. What is the truth? And sorry - fi this a very common question - again...
[12:37:14] <wasanzy> hello
[12:38:12] <wasanzy> I already have two servers which have replica set. I want to add another server, how do I do that? already have the server installed
[13:13:03] <TheThing> okay, I have to ask... WHY does db.mycollection.find({}).sort({ _id: -1 }).limit(1) not return the last id? If I grab the result from the _id and do db.mycollection.find({ _id: { $gt: '<id_here>' }}).count() I get a whooping 1477000 results. How do I get the last id in the collection????
[13:16:14] <TheThing> http://imgur.com/a/bDZrg like, this should work but it isn't
[13:21:26] <TheThing> I've rebuilt the index, I've done everything and it still doesn't return the correct response
[13:24:47] <TheThing> ...
[13:24:49] <TheThing> I'm an idiot
[13:24:51] <StephenLynx> yeah
[13:24:52] <TheThing> disregard everything I said
[13:24:55] <StephenLynx> :^)
[13:24:58] <TheThing> sigh
[13:25:07] <TheThing> let me just blame mongoose for this one :|
[13:25:19] <StephenLynx> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>mongoose
[13:25:29] <StephenLynx> :|
[13:25:37] <TheThing> yeah, I hate it as well
[13:30:41] <TheThing> hmm
[13:31:52] <TheThing> maybe I'm not an idiot after all
[13:32:05] <StephenLynx> you were using the index in reverse order.
[13:35:18] <Chepra> Hey! I have a very confusing behaviour with a a mongodb 2.6.
[13:35:31] <TheThing> StephenLynx: What do you mean?
[13:35:42] <StephenLynx> sort({ _id: -1 })
[13:35:48] <Chepra> I wiped one of our replica set member, and let it resync, and now some collections grown by 33% (from 96gb to 130gb)
[13:35:53] <StephenLynx> what this is telling you is to start from the last element.
[13:36:04] <StephenLynx> so naturally there won't be anything greater.
[13:36:25] <StephenLynx> since ids are incremental.
[13:36:36] <TheThing> StephenLynx: I know, my problem was there was STILL something greater
[13:36:43] <StephenLynx> hm
[13:37:02] <TheThing> then I figured out from my example that using $gt doesn't work unless I use ObjectId('<id here>')
[13:37:15] <StephenLynx> ah
[13:37:25] <StephenLynx> and that fixed it?
[13:37:34] <TheThing> not really, still getting duplicate id's
[13:37:40] <StephenLynx> weird
[13:37:42] <TheThing> and I think
[13:37:52] <StephenLynx> try removing the find
[13:37:54] <TheThing> it's because mongoose is not using $gt as ObjectId
[13:38:07] <StephenLynx> and using the query on the count instead.
[13:38:25] <StephenLynx> also, make sure it works on the shell.
[13:38:33] <StephenLynx> only then you try on your code.
[13:38:56] <TheThing> yeah, good point
[13:42:17] <TheThing> okay
[13:42:20] <TheThing> wtf is going on here
[13:43:31] <TheThing> okay, now I'm being trolled here
[13:43:56] <TheThing> StephenLynx: http://imgur.com/a/iIifF
[13:44:11] <TheThing> oh wow
[13:44:13] <TheThing> it's not
[13:44:15] <TheThing> ...
[13:44:20] <TheThing> the _id is not an ObjectId
[13:44:20] <TheThing> why
[13:44:22] <TheThing> ...
[13:44:22] <TheThing> OH SHIT
[13:44:24] <TheThing> SHIT
[13:44:26] <TheThing> I GOOFED UP
[13:45:30] <kurushiyama> @StephenLynx Hey! Long time no see. ;)
[13:47:51] <TheThing> okay, figured it out
[13:48:04] <TheThing> and now I have a whole bunch of records with _id in string format
[13:48:14] <TheThing> which I need to cleanup
[13:48:17] <TheThing> thanks StephenLynx
[13:49:36] <StephenLynx> >TheThing> the _id is not an ObjectId
[13:49:38] <StephenLynx> aaayyyyyy
[13:49:55] <StephenLynx> sup kurushiyama
[13:50:46] <kurushiyama> StephenLynx Well, work, work, work, more work and a 17 month old ;)
[13:51:03] <StephenLynx> kek
[14:03:41] <pyios> what is the diff of mongodb cluster and sharding?
[14:07:50] <StephenLynx> I'd guess that cluster was the previous tool for the same goal.
[14:07:55] <StephenLynx> guess.
[14:20:24] <kurushiyama> pyios Terminology. A cluster is a deployment utilizing sharding.
[14:20:55] <cheeser> not necessarily sharded.
[14:29:48] <GothAlice> Welp, never mind my reply. :/
[14:30:41] <GothAlice> kurushiyama: A "cluster" is a general term for any group of networked computers acting together for some goal. A shard is a type of subdivision (way of organizing part) of a cluster, similar to a replica being a different subdivision of a cluster.
[14:31:25] <kurushiyama> GothAlice Well, "mongodb cluster" ? ;)
[14:32:11] <kurushiyama> @cheeser Wouldn't an unsharded deployment of multiple servers just be a replset?
[14:39:29] <GothAlice> kurushiyama: A "mongodb cluster" is simply two or more nodes (VMs or physical machines) configured using any of the individual mechanisms, e.g. sharding, replication, or even just a mongos in front of a mongod. A replica set is a type of cluster, a way of organizing nodes within it.
[14:40:16] <kurushiyama> @GothAlice Ah ok. Then I used the terminology wrong thus far. Thanks for the update!
[14:46:01] <GothAlice> kurushiyama: Other examples include: render farms (a cluster dedicated to the math necessary for 3D → 2D projection + rendering), physical simulation clusters (e.g. in the pharmaceutical industry, or even Nvidia simulating the molecules in their GPUs), storage clusters (like Backblaze Storage Pods or other multi-machine NAS), …
[14:46:38] <kurushiyama> @GothAlice Well, I am aware of that. Maybe my approach to terminology is to context-based ;)
[14:46:40] <GothAlice> distcc lets you build a compilation cluster (distributing GCC "cc" calls across multiple machines), etc.
[14:47:11] <kurushiyama> Yeah. LFS with distcc... ...that was fun...
[14:47:35] <GothAlice> :P -j 192 is a glorious thing to behold! Kernel compile from depclean in ~45 seconds.
[14:48:04] <GothAlice> Literally took a new Ubuntu box longer to download the kernel binary and apply it, than for my Gentoo (scripted LFS) to compile one from source. XP
[14:49:36] <GothAlice> Split all the nets!