PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 24th of October, 2019

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[08:37:12] <__that__> Hi all
[08:37:56] <__that__> Can I store datetime fields with nanoseconds in MongoDB?
[11:17:33] <__that__> hi everyone
[11:17:52] <__that__> does anyone how can I store a datetime with milliseconds in MongoDB from python Datetime?
[11:53:25] <GothAlice> __that__: If you need milliseconds, store your datetime not as a datetime, but as an integer number milliseconds. E.g. JavaScript UNIX timestamp.
[11:54:19] <GothAlice> Similar: doing financial calculations? Don't use floats, EVER, store integer cents. (Or use a real Decimal. ;)
[11:55:44] <GothAlice> (Uber, demonstrating programming best practices by not doing them: http://s.webcore.io/d918d6183593/round-your-floats-people.jpeg ;)
[13:25:44] <d_s> >store your datetime not as a datetime, but as an integer number milliseconds.
[13:25:52] <d_s> what a superb dbms :D
[13:40:37] <GothAlice> See also: the Date reference from the MongoDB documentation, which supports instantiation using integer number of milliseconds. I mean, like, really. Find better things to complain about, man.
[14:47:51] <f00lest> I receive connection closed in the middle of mongo db operations
[14:47:59] <f00lest> I am using mongoose to connect to mongodb
[14:48:04] <f00lest> using nodejs server
[14:48:21] <f00lest> I am performing some aggregation operations
[14:48:36] <f00lest> A few operations run fine
[14:49:00] <f00lest> but after that it throws an error connection closed or transition error
[14:49:11] <f00lest> what can I do to resolve this error?
[20:52:48] <b0nn> does mongodb have a log you can watch?
[20:53:14] <b0nn> https://www.mkyong.com/mongodb/mongodb-where-is-the-log-file/
[21:17:18] <GothAlice> b0nn: I generally dive into official documentation first. Tends to be the most complete and helpful: https://docs.mongodb.com/manual/reference/log-messages/index.html being a reference missing from that answer.
[21:18:41] <b0nn> GothAlice: Heh, thanks, I was guessing and the link was the first I found on Google
[21:18:51] <b0nn> The complete answer is better, though
[21:19:06] <GothAlice> :switches off computer guidance: "Luke…" "Y-yes?" "Use the targeting scanner; advanced electronics designed to hit tiny targets." "Awww… but I wanted to use the Force…"
[21:23:49] <GothAlice> b0nn: Problem is those instructions wouldn't work for me. :P The mongod invocation in my init.d's case passes through $MONGOD_OPTIONS exposed via rc.d touching on https://docs.mongodb.com/manual/reference/program/mongod/ (second official documentation reference in answer, but not otherwise mentioned).
[21:27:29] <GothAlice> Looking again, mongod / command line not even mentioned.
[21:33:20] <GothAlice> Google is great, though; you can combine the superpowers of authoritative correct information and the wizardry of search: any time you have a question about something, include it's documentation's domain name in your search prefixed by "site:". E.g.: https://www.google.com/search?q=logging+site%3Adocs.mongodb.com&oq=logging+site%3Adocs.mongodb.com
[21:33:32] <GothAlice> s/it's/its/