PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 14th of September, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[07:12:11] <himanshu> Hi, I am new to mongodb. I have saved Object IDs as string without reference, at places where I want to tag. I did it in wrong way. Now I want to convert those string to object ID and reference them to respective Collections. Please help me out.
[07:15:42] <joannac> get the document, modify the document to make the string into a ObjectID, save the new document
[07:17:14] <himanshu> joannac: I see, I can convert these strings to object ids. But then how to add reference back to them ?
[07:20:40] <joannac> himanshu: what do you mean, reference?
[07:24:32] <himanshu> joannac: For example, a list of user id : [ user1_objectID, user2_objectID ]. So now I want to reference these user IDs to User Collection. Isn't this thing called referencing ?
[07:24:57] <himanshu> Correct me :P. I am new to mongodb.
[07:25:07] <joannac> I think you're thinking of something that doesn't exist
[07:25:15] <joannac> maybe DBRef? https://docs.mongodb.com/manual/reference/database-references/
[07:28:22] <himanshu> Aah, yes that only. :p Thanks for the link
[09:32:45] <txm> Hi, is there any built in encryption (at rest) available for open source mondodb?
[09:36:08] <Derick> Not thta I'm aware of
[09:36:10] <Derick> that*
[09:36:24] <txm> thanks :)
[09:52:30] <hdkiller_> hello! i have a collection with 8000 small documents and i am trying to do around 400-500 qps with queries like this: db.getCollection('pool_ip').find({ $and:[{ long_start:{$lte:3111560450}, long_end:{$gt:3111560450} }]}) and when i start mongodb host start loading. I have an index long_start_1_long_end_1 { "long_start" : 1.0, "long_end" : 1.0 }
[09:52:40] <hdkiller_> I am a mongo noob, what am I doing wrong?
[09:54:31] <Derick> check the log and find out
[09:54:40] <Derick> it's usually in /var/log/mongodb/mongodb.log
[09:54:51] <Derick> also, waht does "mongodb host start loading" exactly mean?
[09:55:23] <hdkiller_> the load on the host running mongodb jumps to load average: 190.85, 67.92, 72.44
[09:55:59] <Derick> what does iostat tell you? what's your memory usage vs swap? How much data do you have? There can be so many reasons... it's not a simple answer.
[09:57:40] <hdkiller_> this collection is just 8000 small documents, i have no idea how large the whole collection, but i don't think it's significant to cause any problems. ram 64G/59G used no swapping at all
[09:57:59] <Derick> then check the log, there must be a reason
[10:59:38] <hdkiller_> Derick: 2016-09-14T12:47:10.942+0200 I COMMAND [conn45887] query pool.pool_ip query: { $and: [ { long_start: { $lte: 3211228110 } }, { long_end: { $gte: 3211228110 } } ] } planSummary: IXSCAN { long_start: 1.0, long_end: 1.0 } ntoreturn:0 ntoskip:0 nscanned:6494 nscannedObjects:0 keyUpdates:0 writeConflicts:0 numYields:51 nreturned:0 reslen:20
[10:59:40] <hdkiller_> Derick: locks:{ Global: { acquireCount: { r: 104 } }, MMAPV1Journal: { acquireCount: { r: 52 } }, Database: { acquireCount: { r: 52 } }, Collection: { acquireCount: { R: 52 } } } user_key_comparison_count:0 block_cache_hit_count:0 block_read_count:0 block_read_byte:0 internal_key_skipped_count:0 internal_delete_skipped_count:0 get_from_memtable_count:0 seek_on_memtable_count:0 seek_child_seek_count:0 585ms
[11:50:59] <crazyphil> if I have a sharded 2.6 setup, and I need to turn auth on (mongodb-cr specifically), do I need to set every mongod instance for --auth, or only my config servers, or everything?
[12:03:37] <joannac> crazyphil: everything
[12:08:50] <crazyphil> joannac: thank you
[12:09:39] <crazyphil> I am assuming that includes mongo-s
[12:09:49] <joannac> yes
[12:10:17] <joannac> https://docs.mongodb.com/v3.2/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster/
[12:23:13] <admin0> hi all..if i have 3 datacenters for 3 mongodb servers, and need data in all of them, where do I put my arbriter ?
[12:25:36] <admin0> and does all 3 need to be in a layer2 domain or is layer3 (unicast) also works fine ?
[13:03:38] <greatgg> hi
[13:04:00] <greatgg> I need little help about my mongodb server
[13:06:45] <greatgg> anyone here?
[13:07:06] <teprrr> no, no one's here
[13:07:16] <greatgg> :(
[13:07:29] <greatgg> no one could find a solution
[13:08:32] <joannac> greatgg: asking a question would be a god start
[13:09:12] <greatgg> oh sorry
[13:09:35] <greatgg> we have a production site running on nodejs
[13:09:48] <StephenLynx> kek
[13:10:06] <greatgg> our server has 64gb ram E5 processor etc.
[13:10:19] <greatgg> its very powerful but
[13:10:42] <greatgg> mongodb is really slow and using 700-800mb ram only
[13:10:54] <StephenLynx> are they on the same server?
[13:10:57] <greatgg> yes
[13:11:06] <StephenLynx> that's not good for a production environment.
[13:11:12] <StephenLynx> not a professional one.
[13:11:24] <greatgg> why
[13:11:49] <greatgg> nodejs is not using too much things too
[13:12:25] <StephenLynx> have you diagnosed which queries are slow?
[13:12:40] <greatgg> nope how can i do that
[13:12:55] <StephenLynx> explain() can help.
[13:13:03] <StephenLynx> aside from that
[13:13:11] <greatgg> to every query?
[13:13:17] <StephenLynx> its just something that you do if you know the software running.
[13:13:33] <StephenLynx> first you check high-level server operations.
[13:13:43] <StephenLynx> then you investigate which part of the operation is slow.
[13:14:13] <StephenLynx> after you figure the slow queries you check if it's properly indexed.
[13:14:18] <greatgg> i tried explain and add some indexes after that
[13:14:23] <greatgg> yep
[13:14:36] <greatgg> it helped but not really
[13:15:09] <StephenLynx> what was your reasoning behind the indexes?
[13:15:33] <greatgg> i was using sort
[13:15:36] <StephenLynx> how large are the collections? what kind of queries were these?
[13:15:43] <greatgg> i have a collection with 2,5 million documents
[13:15:56] <greatgg> its probably slowing everyting
[13:16:02] <StephenLynx> what did the query do?
[13:16:49] <greatgg> it takes users last watches
[13:17:02] <greatgg> sorting by date and limiting to 30
[13:17:03] <StephenLynx> on a technical point of view.
[13:17:33] <StephenLynx> what are watches? what kind of field are they? how did you queried for them?
[13:17:41] <StephenLynx> how did you sorted?
[13:17:46] <StephenLynx> what was the exact query?
[13:18:20] <greatgg> db.watches.find({type: 'episode', user_id: user._id}, {episode_id: true, last_watch: true}).limit(30).sort({last_watch: -1}, callback
[13:18:28] <greatgg> this is node code for command
[13:19:38] <StephenLynx> what are the indexes for the collection?
[13:19:51] <greatgg> _id and last_watch
[13:20:08] <StephenLynx> so neither of the fields being used to query are indexed?
[13:20:12] <teprrr> .. :)
[13:20:13] <StephenLynx> on a 2.5m long collection?
[13:20:35] <teprrr> would be probably a good idea to index user_id at least
[13:20:39] <greatgg> omg i should add them too
[13:20:57] <greatgg> what about type?
[13:21:05] <greatgg> its only episode or movie
[13:21:12] <StephenLynx> I wouldn't bother.
[13:21:31] <StephenLynx> I don't think its necessary, but you can try it out.
[13:21:34] <greatgg> ok wait im adding
[13:21:53] <StephenLynx> keep in mind that indexes on a collection that large will use up quite some resources.
[13:22:01] <StephenLynx> I'd remove the index for last_watch btw
[13:22:08] <StephenLynx> sorting 30 elements its trivial.
[13:23:09] <StephenLynx> you might as well
[13:23:15] <StephenLynx> just remove user_id
[13:23:23] <StephenLynx> and refer these using _id instead.
[13:23:35] <StephenLynx> wait
[13:23:41] <StephenLynx> nvm
[13:23:46] <greatgg> one user have a lot of watched things
[13:23:52] <StephenLynx> forget what I said about user_id
[13:23:57] <greatgg> :)
[13:24:24] <greatgg> omg
[13:24:26] <greatgg> i love you
[13:24:31] <StephenLynx> kek
[13:24:34] <greatgg> its really faster
[13:24:39] <StephenLynx> fresh outta college?
[13:25:03] <greatgg> ah nope but i dont know much about mongodb
[13:25:14] <StephenLynx> that's db 101 though.
[13:25:32] <greatgg> do you have any other tips
[13:25:37] <StephenLynx> git gud :v
[13:26:32] <greatgg> ahah
[13:26:54] <greatgg> so i should add indexes to everything i query
[13:27:10] <ashp> 2016-09-13T18:17:26.600-0400 [conn2481792] query local.oplog.rs query: { ts: { $gt: Timestamp 1473804205000|273 } } planSummary: COLLSCAN cursorid:1028688818334 ntoreturn:0 ntoskip:0 exhaust:1 nscanned:24368965 nscannedObjects:24368965 keyUpdates:0 numYields:48119 locks(micros) r:96563812 nreturned:101 reslen:411143 439730ms
[13:27:14] <StephenLynx> no, not really.
[13:27:22] <ashp> Hmm, is there a way I can make an index on this to cover $gt stuff?
[13:27:25] <StephenLynx> you should indexes that got impact.
[13:27:25] <ashp> I'm pretty bad with indexes
[13:27:47] <ashp> oh maybe local is the replication stuff
[13:27:53] <StephenLynx> if an index doesn't change much, might as well not bother with it.
[13:28:09] <StephenLynx> if an index makes updating slow, you might consider not using it.
[13:28:23] <greatgg> so i can index things like user_id
[13:28:29] <StephenLynx> when a document changes size too often, indexes must be rebuilt, if I am not mistaken.
[13:28:39] <StephenLynx> you MUST index things like user_id
[13:29:00] <greatgg> *indexes everything*
[13:29:02] <greatgg> lol
[13:29:11] <StephenLynx> large collection where you look for stuff must be indexed.
[13:29:44] <greatgg> we have some social feed like twitter
[13:29:52] <greatgg> and facebook
[13:29:56] <StephenLynx> the logic is very simple: will this index impact performance in a positive manner and I got resources to keep it? then you use.
[13:30:44] <greatgg> wow
[13:30:59] <StephenLynx> the nuances are on stuff like compound indexes.
[13:31:10] <StephenLynx> for example
[13:31:15] <greatgg> our db is really little actually
[13:31:19] <greatgg> just 300mb
[13:31:25] <StephenLynx> you might have to index X,Y or Y,X
[13:31:40] <StephenLynx> amount of documents matters more than document size.
[13:31:59] <greatgg> absolutely
[13:33:05] <greatgg> does it matter how i created indexes
[13:33:21] <greatgg> like .createIndex({user_id:1,type_id:1})
[13:33:31] <greatgg> or seprated?
[13:34:47] <StephenLynx> yes.
[13:34:55] <StephenLynx> that there is a compound index.
[13:35:01] <StephenLynx> and even the order of the fields matter.
[13:35:08] <greatgg> omg
[13:35:41] <greatgg> so i should add every one seprated right
[13:35:46] <StephenLynx> that depends.
[13:36:10] <StephenLynx> in your case
[13:36:20] <StephenLynx> I don't think you have to index more than the user.
[13:36:28] <StephenLynx> since you have only two values for type.
[13:36:59] <greatgg> oh
[13:37:11] <greatgg> i need to read all index docs
[13:39:12] <greatgg> does it matter 1 or -1
[13:39:29] <greatgg> when creating indexe
[13:39:35] <greatgg> *indexes
[13:39:37] <StephenLynx> on regular indexes no.
[13:39:48] <greatgg> ok nice
[13:39:50] <StephenLynx> on compound indexes I THINK it might matter if they are both the same or not.
[13:39:59] <StephenLynx> 1, 1 = -1, -1
[13:40:18] <StephenLynx> but 1,-1 might not equal to 1,1
[13:40:29] <StephenLynx> because it indexed one field ascending and the other descending.
[13:40:40] <greatgg> oh yes
[13:44:49] <Pinkamena_D> can you use gridFS to store large BSON documents?
[13:47:33] <StephenLynx> yes.
[13:47:52] <StephenLynx> gridfs is just a driver-level abstraction for binary data, though.
[13:47:56] <Pinkamena_D> You have to serilize each time?
[13:47:59] <StephenLynx> no.
[13:48:08] <StephenLynx> however
[13:48:22] <StephenLynx> is there any reason you wouldn't store the bson as a document?
[13:48:36] <Pinkamena_D> too large
[13:49:30] <StephenLynx> hm
[13:49:45] <Pinkamena_D> using pymongo it seems only strings are able to be uploaded
[13:50:17] <Derick> gridfs is for large binary strings
[13:50:26] <Derick> <Pinkamena_D> can you use gridFS to store large BSON documents?
[13:50:29] <Derick> no - you can't
[13:50:38] <Derick> as you'd have to serialize them to a string each time.
[13:50:48] <StephenLynx> wtf
[13:51:13] <Derick> StephenLynx: sorry, that's what GridFS - a big file (binary string) store
[13:51:39] <StephenLynx> if you can put on a binary file on your fs, you can put on gridfs.
[13:51:46] <Pinkamena_D> hmm well, very well then. :)
[13:51:48] <Derick> yes, that's what it is for
[13:52:00] <StephenLynx> then why wouldn't you be able to store a bson file?
[13:52:08] <Derick> but it's not for storing "BSON documents" that you would store in a collection, for that to work, you need to serialize to a string
[13:52:21] <StephenLynx> oh
[13:52:33] <StephenLynx> he never mentioned he wanted to handle it like an actual document.
[13:53:09] <Derick> Pinkamena_D: in any case, if your normal documents are that big, you probably should rethink your schema
[13:54:04] <Pinkamena_D> I dont need to handle it like a document (while it is stored), I just thought the serialization would reduce preformance slightly
[13:54:15] <Derick> it would
[13:54:42] <StephenLynx> if you don't have to handle it unlike any other binary blob, then yes, you can use it.
[13:54:52] <Pinkamena_D> most documents are not that large, this piece I am working on would act as a cache in case we were not able to connect to the actual in-memory cache
[13:55:12] <Pinkamena_D> just basically needs to work temporarialy
[16:00:01] <bros> How are replica members handled over WAN?
[16:00:04] <bros> SSH bridging? no
[16:00:05] <bros> VPN?
[16:00:07] <bros> IPSec?
[16:08:32] <Naeblis> Is there any way to query for a specific value that occurs n times in an array?
[16:08:44] <bros> Naeblis: aggregate?
[16:08:46] <Naeblis> yes
[16:09:07] <Naeblis> I have potential duplicate item that I want to ignore
[16:09:30] <Naeblis> or well, if there are duplicates, only take the most frequent or first value etc. But need to find them first
[17:35:07] <deathanchor> mongo3.2: what's the shell command for allowing secondary? so I can run show dbs.
[17:47:16] <deathanchor> got it, rs.slaveOk()
[17:47:49] <bros> I ran rs.add('...') and nothing happened?
[17:48:09] <bros> I see it in rs.status().members
[17:48:21] <deathanchor> tail the logs on the new member
[17:48:34] <deathanchor> and on the current primary
[17:49:55] <bros> It isn't doing anything.
[17:49:59] <bros> Did not find local voted for document at startup; NoMatchingDocument: Did not find replica set lastVote document in local.replset.election
[17:50:02] <bros> Did not find local replica set configuration document at startup; NoMatchingDocument: Did not find replica set configuration document in local.system.replset
[17:50:41] <bros> "waiting for connections on port 27017"
[17:51:52] <bros> 2016-09-14T13:41:30.791-0400 I REPL [ReplicationExecutor] Error in heartbeat request to 10.8.0.10:27017; ExceededTimeLimit: Operation timed out
[17:52:08] <bros> It's over a VPN. Do I need to unblock that port?
[17:54:33] <Derick> bros: all nodes of the set need to be able to talk to each other
[17:54:36] <Derick> on port 27017
[17:55:24] <bros> Even if it is over VPN?
[17:55:47] <Derick> all nodes need to talk to each other
[17:56:04] <Derick> through the hostname as is shown in "rs.status()" and through por t27017
[17:56:13] <Derick> I am not sure why you think a VPN solves this
[17:56:28] <bros> Derick: because I am trying to avoid having my production database publicly accessible
[17:56:52] <Derick> yes, but each node in the replicaset needs to talk to all the others
[18:05:04] <StephenLynx> bros configure the firewall so only your application servers will be allowed by the OS to connect to the db.
[18:05:17] <StephenLynx> literally zero reason for a VPN
[18:05:37] <bros> help
[18:05:38] <bros> help
[18:05:40] <bros> how do i remove rs members
[18:05:41] <bros> app is down
[18:06:07] <StephenLynx> kek
[18:06:50] <Derick> https://docs.mongodb.com/manual/tutorial/remove-replica-set-member/
[18:09:02] <Derick> ideally the first time you do this shouldn't be in a production environment...
[18:10:14] <bros> it keeps saying i'm not the master
[18:10:55] <Derick> do it from your primary node then
[18:11:06] <Derick> the prompt should tell you which type you're connected to
[18:11:40] <bros> dog
[18:11:43] <bros> it just says secondary
[18:11:45] <bros> i have nothing els erunning
[18:11:46] <bros> fuck
[18:11:48] <bros> what do i do
[18:12:05] <Derick> rs.status() -> post to pastebin
[18:12:16] <Derick> also, don't swear in here please
[18:13:06] <bros> https://gist.github.com/skulabs/7d1cd6be5233d7a170ea0c0e6d9a828e
[18:13:07] <bros> sorry
[18:13:19] <bros> how do i remove the last 2
[18:14:41] <Derick> what's the output of db.isMaster() ? -> pastebin
[18:15:05] <bros> https://gist.github.com/skulabs/f7981d740937fcfec6f88d1c0bb84aaf
[18:15:08] <bros> pleae help
[18:15:17] <Derick> which node does your application connect to? what is its connection string?
[18:15:36] <Derick> (of the app, that is)
[18:15:58] <bros> mongodb://10.128.20.56:27017,10.128.15.141:27017/db?replicaSet=rl0
[18:16:33] <Derick> bros: and how/why did you add the other *two* nodes?
[18:16:40] <bros> i don;t know
[18:16:43] <bros> how can i get rid of them
[18:16:50] <bros> please help
[18:16:58] <Derick> stop saying that, I am trying to.
[18:17:39] <Derick> there are two 10.128 nodes, and the new ones are 10.8.x
[18:17:56] <Derick> can you make it so that the node you're connected to can talk to *one* of the 10.8.x nodes?
[18:18:10] <Derick> are they two different subnets?
[18:18:10] <bros> no
[18:18:14] <bros> i need to get rid of 10.8.x
[18:18:15] <bros> asap
[18:18:17] <Derick> I KNOW
[18:18:19] <bros> why do i have no primaruy
[18:18:38] <Derick> because with 4 nodes, and two nodes not working, the 2 left over nodes can not form a majority, and hence not have a primary
[18:18:49] <bros> so how the hell can i remove them
[18:18:55] <bros> should i just change the connection string
[18:18:57] <bros> drop the replica set?
[18:18:58] <Derick> Again, language.
[18:19:06] <bros> DUDE
[18:19:07] <bros> PLEASE
[18:19:08] <StephenLynx> kek
[18:19:21] <StephenLynx> i think joannac can sell you some support :V
[18:19:44] <Derick> bros: your fuckups are not my responsibility, so play nice when people try to help
[18:20:04] <Derick> I think your best bet is: change the connection string to only have the 10.128.15.141 node in it
[18:20:20] <Derick> *then*, restart that node without the replicaSet option set
[18:21:29] <bros> cfg = rs.conf()
[18:21:29] <bros> cfg.members = [cfg.members[0] , cfg.members[1]]
[18:21:29] <bros> rs.reconfig(cfg, {force : true})
[18:21:33] <Derick> if you have done that, you can empty the local.system.replset collection - and then start over again.
[18:21:33] <bros> you guys are ass
[18:22:00] <Derick> http://serverfault.com/a/424714 is basically it.
[18:26:05] <bros> Alright. so how SHOULD I have added members to my replica set?
[18:26:10] <bros> By hitting rs.freeze first?
[18:26:18] <bros> Why would it try to choose a new primary?...
[18:26:21] <Derick> One at a time
[18:26:47] <Derick> wait until it stabalizes (syncs) and *then* add another one
[18:26:55] <bros> i added 2 unreachable
[18:27:01] <Derick> and all nodes, need to be able to talk to all other nodes
[18:27:06] <Derick> yes - if you had added only one
[18:27:26] <Derick> you would have found about the problem, and because 2 is more than the majority of 3, it would have worked
[18:27:36] <Derick> *even* if the third node was broken
[18:27:46] <bros> Ok. Could I have called rs.freeze?
[18:28:00] <Derick> I have not used that.
[18:30:43] <bros> Ok. And you were wrong
[18:30:45] <bros> if hosts are in a VPN
[18:30:48] <bros> You don't need to play with ports.
[18:30:56] <Derick> I never said that
[18:31:11] <Derick> I said that all nodes need to able to talk to eachother (through port 27017)
[18:33:04] <pihpah> I have to insert about of 700 nested documents and it takes about 2 minutes. With every insert the insert time is getting worse, and that's really sad.
[18:49:15] <AndrewYoung> What sort of indexes do you have set up?
[18:49:23] <AndrewYoung> (For the slow inserts)
[18:53:25] <AlmightyOatmeal> I'm running a seemingly expensive query, is there any way to determine exactly what it's doing? Also, is there a way to make mongod utilize multiple processors? I'm currently running a query against a collection within a DB but it seems to be sticking to only one core :(
[18:55:08] <synthmeat> hey, is there some kind of mini mongo i could run? i like mongo, and i'd like to have it on really small instance (512MB) with possibly other stuff alongside it
[18:56:37] <synthmeat> hah. there actually is mini mongo, but that's something from meteor for clients. prolly single rw
[18:58:23] <synthmeat> totally another db with exact same surface (query language, i guess) would do too
[18:59:31] <n1colas> Hello
[19:02:33] <pihpah> AndrewYoung: no indices at all.
[19:04:26] <AndrewYoung> AlmightyOatmeal: You can use the query analyzer. From the mongo shell you can run "var explain = db.foo.explain()" and then do things like "explain.find({ /* query */})"
[19:04:41] <AndrewYoung> https://docs.mongodb.com/manual/reference/method/cursor.explain/
[19:04:49] <AlmightyOatmeal> AndrewYoung: oh, that's sexy! thank you :)
[19:05:28] <AndrewYoung> The best way to make mongo use more than one processor for a single query is to implement micro-sharding, where you split your data across multiple mongod instances.
[19:05:46] <bros> AndrewYoung: how common is that?
[19:05:51] <AndrewYoung> However, it's complicated and there can be serious problems with it if you machine isn't well provisioned.
[19:05:52] <AlmightyOatmeal> AndrewYoung: interesting
[19:06:12] <AndrewYoung> It has some very specific use cases where it works well, but it's not generally used.
[19:06:40] <AndrewYoung> You would want to run the shards in some sort of container so that they are memory limited, etc.
[19:06:59] <AndrewYoung> By default mongod makes use of all the memory on the box (effectively).
[19:07:36] <AlmightyOatmeal> AndrewYoung: that's one complaint that i have is that i can't seem to limit resource utilization of mongod which has caused OOM issues
[19:07:48] <AndrewYoung> Then you make the query to a mongos and it does a scatter/gather operation on the shards, splitting the work up amongst the shards.
[19:07:50] <AlmightyOatmeal> even when i tell wiredtiger to only use X GB
[19:08:06] <AndrewYoung> Interesting. Have you submitted a support ticket on that?
[19:08:30] <AlmightyOatmeal> AndrewYoung: i have not done so yet.
[19:09:10] <AndrewYoung> MongoDB will give either 60% of available RAM on the box - 1GB (it looks in /proc to find that info, I believe) or 1GB, whichever is larger.
[19:09:19] <AndrewYoung> (by default)
[19:09:48] <AndrewYoung> Also, swap is important for WiredTiger, whereas it was not as important for MMAPv1.
[19:11:11] <AndrewYoung> The support folks might know if that memory thing is a known issue or not.
[19:12:32] <AlmightyOatmeal> http://pastebin.com/UYaeVPR7
[19:12:37] <AlmightyOatmeal> if curious
[19:12:47] <AndrewYoung> synthmeat: You might try running it with the MMAPv1 storage engine instead of WiredTiger. You'll lose the benefits of WiredTiger though.
[19:13:20] <AndrewYoung> Under provisioning can be a problem though. If your "working set" (the combination of indexes and commonly used data) doesn't fit in memory it can cause performance issues.
[19:13:53] <synthmeat> that's fine, i wouldn't use it for such cases anyways
[19:14:15] <synthmeat> but, iirc, mmapv1 still required ample memory?
[19:14:20] <AlmightyOatmeal> FWIW, i've played with a number of WiredTiger cache sizes and have tried to slowly decrease trying to prevent OOM. i tried limiting the sources granted to the process but that really upset mongod
[19:14:36] <AndrewYoung> AlmightyOatmeal: Interesting. How much cache do you have?
[19:16:20] <AlmightyOatmeal> AndrewYoung: provisioned WiredTiger cache, or what cache inparticular?
[19:17:58] <AndrewYoung> Sorry, i meant swap
[19:19:04] <AndrewYoung> OOM killer is worse under WiredTiger than MMAPv1 because when the kernel is running low on memory under MMAPv1 it just flushes stuff back to disk because it knows it can do that, but with WiredTiger it has to move stuff to swap. If it can't do that then OOM killer will kick in.
[19:22:18] <zylo4747> if i'm going to create a hidden replica set member with priority 0, can i put those options in the config file or do i only define them when adding the member
[19:23:04] <AlmightyOatmeal> AndrewYoung: i'm not running Linux so OOM Killer isn't a problem, however limiting available resources outside of mongod gave me http://pastebin.com/QVnbQbKc and to answer the swap question: http://pastebin.com/xDE8HFb8 but i try to avoid the extra disk I/O for swapping if at all possible as i would rather save that for actual data I/O
[19:24:32] <AlmightyOatmeal> i really hate to say that CouchBase was pretty sweet in terms of clustering and resource limiting/kindness but MongoDB is easier, faster, and the filesystem footprint is the smallest of any document stores i've tested
[19:25:02] <AlmightyOatmeal> but it seems resource control and ease of clustering has a long way to go :(
[19:25:19] <AndrewYoung> Yeah, it generally works under the assumption that it has the whole box.
[19:26:25] <AlmightyOatmeal> even if it has the "whole box", that means it can choke off other essential system services as well which is not a good thing if you want to guarantee Y percent of Z resources for system management :(
[19:26:56] <AlmightyOatmeal> have you heard of Percona Server for MongoDB?
[19:27:47] <AndrewYoung> Well, I meant no other major services running on the box. That's why it assigns 60% to the cache.
[19:27:59] <AndrewYoung> I know of it, yes, but I don't know any details about it.
[19:28:23] <AndrewYoung> Have you tried running mongod in a bsd jail to limit resources?
[19:28:31] <AndrewYoung> (Since you're on FreeBSD)
[19:29:05] <AndrewYoung> zylo4747: You put it in the replica set config
[19:29:12] <AndrewYoung> When you add the server
[19:29:56] <AlmightyOatmeal> AndrewYoung: in a jail, no, but i created a custom login class for the mongodb user running mongod (which is where i received the OOM)
[19:30:13] <zylo4747> So this is valid?
[19:30:14] <AndrewYoung> synthmeat: Yes, it still requires a good bit of memory, but because of how it works (using the system mmap calls) it plays nicer in small memory environments I think.
[19:30:21] <zylo4747> hold on - pastebin'ing it
[19:30:54] <zylo4747> http://pastebin.com/trTeKpiy
[19:31:35] <zylo4747> oh wait, nevermind
[19:31:39] <zylo4747> you said when adding the server
[19:31:40] <zylo4747> got it
[19:31:41] <zylo4747> thanks
[19:31:49] <AndrewYoung> :)
[19:44:44] <synthmeat> AndrewYoung: i think better solution would be to set up one large instance that serves multiple projects, actually
[19:45:32] <AndrewYoung> Yes, that is better, but I thought you were asking specifically about using a small instance. :)
[20:13:42] <Doyle> Does anyone run ClamAV on their mongodb servers? Issues to consider?
[20:38:36] <combat> Guuyyyys what's that mean? -> MongoError: Syntax error, incorrect syntax near '48' ? any tips?
[20:46:41] <combat> anyone?
[20:53:40] <AlmightyOatmeal> combat: that's pretty self-explainatory.
[20:58:32] <combat> idk what's '48' I'm running tests in nodebb connected to mongodb on Azure servers (DocumentDB service)
[20:59:21] <joannac> combat: then you should figure out exactly what you're sending to the server