PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 17th of October, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[02:01:34] <prasincs> Has anyone run into "Nothing to do. Either the server detected the possibility of another monitoring agent running, or no Hosts are configured on the MMS group." on a fresh mongo-mms-agent install?
[02:02:09] <prasincs> there's no other client running and I can't seem to see any effects when I change the logLevels to debug and such
[02:02:43] <edrocks> prasincs: that sounds werid. Does it say anything in the docs about that?
[02:02:54] <prasincs> can't find anything specific
[02:03:19] <prasincs> edrocks: there's a jira ticket about some customer whose groupId was wrong
[02:03:22] <prasincs> but that was for API
[02:03:22] <Boomtime> is this the only agent you have ever installed?
[02:03:33] <prasincs> no.. I ran automation agent on other servers
[02:03:38] <prasincs> but on this server yes
[02:04:02] <Boomtime> the error says 'monitoring agent', not automation
[02:04:07] <prasincs> yes
[02:04:16] <prasincs> this server only has monitoring agent
[02:04:26] <Boomtime> you only need one monitoring agent, you can have 2 for redundancy if you like
[02:04:45] <Boomtime> i.e you only need one monitoring agent for ALL your hosts
[02:05:06] <prasincs> I mentioned that only in case there's something to do with my account.. I also can't seem to create a public api key
[02:28:12] <prasincs> @Boomtime is there a way to get more detailed logs?
[02:28:28] <prasincs> I can follow up on support site too fi someone can point me there
[03:01:31] <hydrajump> Boomtime: hey
[03:03:24] <joannac> prbc: what are you looking for logs for?
[03:03:36] <joannac> you have multiple monitoring agents, or you have no hosts to monitor
[03:03:44] <joannac> oh, he's gone
[03:03:54] <prbc> what?
[03:04:02] <joannac> sorry prbc, mishilight
[03:04:07] <prbc> ahahha
[03:04:31] <joannac> >.<
[03:08:09] <hydrajump> Boomtime: The replication lag calculation you helped me with the other day. I've been trying to find the best way to find the secondary member with the lowest lag, and thus most in sync with the primary to lock. However, as I think more about it what I'm confused about is I want to lock the specific member for as short time as possible, but if I don't lock it when I've determined it is most in sync. Does
[03:08:11] <hydrajump> that calculation I did mean anything if during the time I perform other operations, such as determine the EBS volumes attached to the instance to snapshot, the other secondary might become the one that is more in sync?
[03:08:24] <hydrajump> Does my reasoning make sense?
[03:26:08] <joannac> hydrajump: how much replica lag do you have?
[03:27:07] <joannac> yes, the one that is "more up to date" can change, but how long do the other steps take (checking EBS volumes)?
[03:29:03] <joannac> I feel like you're solving a problem that shouldn't exist. Or if it does, you should be solving that problem
[03:29:54] <joannac> i.e. all your secondaries should be reasonably up to date. you shouldn't need to fuss over which one to lock. if you have secondaries that are grossly behind, that is the problem you should be solving. Not messing around trying to figure out which one has the most lag
[04:08:02] <sachinaddy> How to permanently start mongod ?
[04:28:45] <joannac> sachinaddy: i don't know what that means
[04:29:54] <joannac> you need to be a bit more specific
[04:39:58] <sachinaddy> joannac, currently, i m linux environment, I m running #> mongod command
[04:40:18] <sachinaddy> so as long as session is open in laptop, db is connected.
[04:40:47] <joannac> you might be interested in the --fork option then
[04:41:54] <joannac> sachinaddy: http://docs.mongodb.org/manual/reference/program/mongod/#cmdoption--fork
[04:43:39] <sachinaddy> ok.. let me check thanks.
[05:30:17] <Sophomore> Hello, I have a collection which has a pseudo schema which follows like this -> { initial_price: <price>, selling_price: <price>} I want to sort all collections by the discount. How do I do that?
[05:31:04] <Sophomore> Essentially, discount = ((selling - initial)/initial) * 100
[05:33:38] <Boomtime> you want to sort by a field that doesn't exist?
[05:33:53] <Sophomore> Boomtime: Yeah exactly
[05:33:55] <Boomtime> you can use aggregation but it will still require a full collection scan
[05:34:18] <Sophomore> Boomtime: How do I do that?
[05:34:55] <Boomtime> http://docs.mongodb.org/manual/reference/operator/aggregation/project/
[05:35:18] <Boomtime> you will probably want to use a $project to create the new field, then a $sort to sort by that result
[05:35:38] <Sophomore> Boomtime: Where do I do the mathematical operations on the new field?
[05:35:54] <Boomtime> http://docs.mongodb.org/manual/meta/aggregation-quick-reference/#expressions
[05:36:13] <Boomtime> you'll want operator expressions: http://docs.mongodb.org/manual/meta/aggregation-quick-reference/#operator-expressions
[05:36:42] <Sophomore> Boomtime: I do all these inside $project?
[05:36:49] <Boomtime> yep
[05:37:06] <Sophomore> Thanks Boomtime , I'll try that.
[05:40:19] <Boomtime> be aware performance is not going to be great, you're asking the database to sort every single document by a field that it has to calculate on-the-fly
[05:40:52] <Sophomore> Boomtime, Any workaround to that?
[05:41:22] <Boomtime> add the field
[05:41:58] <Sophomore> But it's a dynamic field, likely to change everytime the price changes.
[05:42:37] <Boomtime> so?
[05:43:18] <Sophomore> Oh, I get what you meant :)
[05:43:53] <Sophomore> Boomtime: I'm new to mongo. The switch to it has been daunting.
[05:44:10] <Boomtime> yeah, forget what you know about SQL (I assume this is where you came from)
[05:45:15] <Sophomore> I know some SQL. I'm not from that domain per se. I'm more of a programmer.
[05:46:00] <Sophomore> But yeah, SQL is what I was familiar till now.
[05:48:27] <Boomtime> in most circumstances the vast majority of operations are reads - i.e you read data more often than you write it
[05:48:37] <Boomtime> this means you should optimize your data structures to be really fast to read
[05:49:03] <Boomtime> and if that means you spend a bit more time thinking about how to write it (and update it then it's probably worth it
[05:58:03] <Sophomore> Boomtime: I'll always keep that in mind :)
[06:52:44] <goel88> n88
[06:53:54] <goel88> Hi. Wanted help in one configuration change. How to change connectionsPerHost and threadsAllowedToBlockForConnectionMultiplier configuration in mongdb through mongo shell?
[07:07:28] <Boomtime> baffling sort of question.. but he's left.
[07:07:58] <Boomtime> To those keeping score at home: you cannot change "connectionsPerHost" and "threadsAllowedToBlockForConnectionMultiplier" because the shell is a single connection and single threaded
[07:08:32] <Boomtime> (actually it isn't single connection but it's essentially manual)
[08:17:45] <glontu> hi
[08:18:28] <glontu> i'd like to make an object id that will have some custom prefix and then i'd like mongo to generate a unique part from 3 characters to make sure the id is unique
[08:18:32] <glontu> is this possible ?
[08:44:59] <mattrae> hi, i added an arbiter with addArb(), but rs.status() is showing the 'stateStr' of the node to be "SECONDARY". i thought "ARBITER" would be expected
[08:54:39] <krion> it should
[08:56:17] <krion> mattrae: can you past the entire ouput of rs.status() ?
[10:05:56] <elmcrest> Hi everybody. Is it possible to have a relationship within a collection entry? ... I try to evaluate a rather complicated model.
[10:06:41] <elmcrest> hmm maybe I should read more tutorials first ^^
[10:37:30] <diegoaguilar> Hello for the createUser command
[10:37:40] <diegoaguilar> what exactly does the writeConcern argument do?
[12:34:26] <hydrajump> joannac: these are my results for replica lag https://gist.github.com/anonymous/98ff8e877eb294aa9a10
[12:37:35] <hydrajump> joannac: so your recommendation is that I shouldn't have to write any logic in my backup script worrying about which secondary member to lock and snapshot. I should just choose any secondary, lock it, snapshot it, unlock it and have a consistent backup that if necessary can be used for disaster reocvery or restoring that particular hourly backup?
[13:02:18] <vincentll> hi, i'd like to use a custom variable inside the aggregation framework, and i saw this: http://docs.mongodb.org/manual/reference/aggregation-variables/#user-variables but i'm not sure how to use it, could anyone help me? thanks
[14:00:53] <Forest> hello,i have created a function to batch insert documents into DB,everything gets inserted correctly,but still i get { [MongoError: Connection Closed By Application] name: 'MongoError' } error. Can you help me please? My insert function https://dpaste.de/32Sk
[14:00:58] <Forest> Thanks in advance
[14:07:20] <Forest> Please help me....
[14:36:39] <WhereIsMySpoon> Hi - I have a spring java project where I have an @Bean annotated MongoTemplate being set up in the java - the MongoTemplate instance it creates and returns is not null, but when I try to @Autowire it into a DAO class (@Autowired MongoTemplate template) it's just null, even though my DAO is marked with @Repository =/
[14:56:22] <John______> Hello, is anyone online?
[14:57:31] <John______> Why only two for cycles work for insert and then connection close causes { [MongoError: Connection Closed By Application] name: 'MongoError' } error?
[15:26:40] <eucalyptus> anyone have experience with the MongoDB Hadoop connector?
[15:49:53] <keta> when I run the tool mongo from command line, how do I list all the databases available?
[15:50:26] <cheeser> show dbs
[16:02:25] <keta> I do a mongorestore xxxx and it says "going into namespace [m101.funnynumbers]"
[16:02:41] <keta> then I do mongo
[16:03:04] <keta> and then db.getCollectionNames()
[16:03:07] <keta> and it shows nothing
[16:24:50] <dimon222-cloud> hello, anyone knows if there's a way to do bulk gridfs insertion?
[16:29:23] <cheeser> keta: if you run just "mongo" you're not going to be in the correct database
[16:29:54] <keta> cheeser: right, for some reason it defaults to test database
[16:30:10] <cheeser> well, it has to default to *something* yes.
[16:30:23] <cheeser> so switch to the db you want and then check the collections with "show collections"
[18:44:44] <jrbaldwin> I'm having issues with CPU usage in MongoDB on my server, serverfault thread here: http://serverfault.com/questions/637863/mongodb-high-cpu-usage
[18:44:58] <jrbaldwin> Nobody has responded yet
[18:45:36] <jrbaldwin> Basically, a Mongo process is using ~195% of CPU, I'm not skilled enough to track down the reasoning
[18:50:14] <jrbaldwin> can anyone help?
[18:52:05] <Zelest> try db.currentOp()
[18:52:21] <Zelest> and/or check the logs
[18:56:37] <dimon222-cloud> jrbaldwin since it goes normal when you stop those two nodes, shouldn't it be related to stuff happening in nodes?
[18:56:51] <dimon222-cloud> constantly spamming requests to mongo guess
[18:57:00] <jrbaldwin> yeah
[18:57:22] <jrbaldwin> someone mentioend i might need a queue system
[18:57:28] <jrbaldwin> cause there's a lot of writes going on
[18:57:54] <dimon222-cloud> semaphores can help u
[18:58:06] <dimon222-cloud> at least they do, in most cases
[19:02:44] <jrbaldwin> ok thanks dimon222-cloud !
[19:40:58] <Left_Turn> is MongoHQ free?
[19:44:25] <dimon222-cloud> don't think so
[19:46:04] <dimon222-cloud> http://www.mongodb.com/partners/cloud/mongohq
[19:46:25] <dimon222-cloud> db as a service :C cant be free
[19:53:50] <Left_Turn> ah ok thanks dimon222-cloud
[20:41:52] <Left_Turn> other than mongodb.. any other packages I should install? https://bpaste.net/show/f74875b5f71c
[21:21:43] <jerome-> why is it not possible to insert this document { "user": { "$ref": "User", "$id": ObjectId("5374d465c43a034f528b45ba"), "$db": "db_name" } }
[21:21:44] <jerome-> http://uu.zoy.fr/p/69nOdw#x=d1ySANpLFgDG08cA
[21:21:55] <jerome-> the error is "A document was corrupt or contained invalid characters . or $"
[21:34:46] <dimon222-cloud> The dollar sign (i.e $) is a reserved character used to represent operators
[21:37:41] <dimon222-cloud> If you really need this dollar character then use Unicode equivalent
[21:38:35] <dimon222-cloud> Same thing with dots
[21:54:08] <jerome-> so how can I create a dbref ?
[22:11:59] <churowa> Using pymongo on nginx+uwsgi/gevent, my code just fails silently for no reason when trying to make a find_one call. The craziest thing is that the problem appears to be intermittent. I can't recreate it on demand. Has anyone ever seen anything like this? What further information can I supply to narrow it down?
[23:16:44] <morenoh149> can I just store a json object in mongo?
[23:46:29] <dimon222-cloud> Serialized yeh