PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 22nd of January, 2020

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[03:48:17] <dapinitial> Hello Mongoers, I am new to using this DB and I am wondering how I can prevent Duplicates? I am using NodeJS and I am POSTing with Postman and I expecting errors for duplicate entries but they keep coming through. I am using Mongo Community v4.2.2
[06:10:43] <GothAlice> dapinitial: https://stackoverflow.com/a/55386123/211827 ← this explores one reason why there might not be unique conflicts, in this case, an ObjectId vs. its hex string version. (Not the same.) Other reasons might include: not actually having a unique index. https://docs.mongodb.com/manual/core/index-unique/
[06:11:20] <GothAlice> (Since you weren't specific as to what was or was not being "duplicated". _id is the only automatic index.)
[06:25:59] <GothAlice> dapinitial: Potential mistake, actually, if implementing your own data restoration procedures. Two ways to go about things: insert the data, then create the indexes, or the reverse. The former gives you faster inserts, and a delay to build the indexes at the end, but only notification of errors like unique violations at the end. The latter gives you slower inserts, but index construction as the inserts go.
[06:26:31] <GothAlice> (And error notification the moment of attempted insert.)
[06:26:52] <GothAlice> Similar with the application of validation documents.
[06:41:39] <dapinitial> GothAlice: thanks, that's a starting point. I have same name but the _id is unique and I see that is a feature but I am trying to check against NAME ?
[06:42:38] <GothAlice> dapinitial: If you want NAME to be unique (why the all-screaming-case? ;) then you will need to construct an explicit unique index which includes that field, se the docs.mongodb.com link I gave.
[06:43:09] <dapinitial> thanks and I will use `name` in the future
[12:14:44] <Intelo> mongodb is not starting. No logs either made. What can I do? Process: 31397 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=1/FAILURE)
[12:16:21] <Intelo> https://pastebin.pl/view/cc22f7c2
[12:27:20] <Intelo> https://pastebin.pl/view/7dc2fdfa
[12:32:15] <Intelo> its running now once I changed logfile name (permission issue of log file). However I do want to limit the log file size. Whats the best way? Do I need to limit number of files as well? (log rotation I mean)
[13:27:40] <Mr_Queue> /win 8
[16:37:07] <Intelo> setParameter: maxLogSizeKB: 100000 isnt working. My log file is near 700mb. What could be wrong? https://pastebin.pl/view/e71b6f57
[16:44:41] <benjwadams> Can a small mongodb instance be run with ZFS as the underlying filesystem?
[17:15:14] <Intelo> setParameter: maxLogSizeKB: 100000 isnt working. My log file is near 700mb. What could be wrong? https://pastebin.pl/view/e71b6f57