[12:37:07] <cheeser> conforming with that spec is why
[12:53:10] <seiren> Hi guys, i'm getting the following error in my NodeJS App with MongoDB. Please msg me as i'm about to go away from my desk. Thank you. MongoError: server 127.0.0.1:27017 received an error {"name":"MongoError","message":"write EPIPE"}
[13:15:50] <StephenLynx> are you using mongoose too?
[13:19:44] <seiren> it doesnt always happen either :/
[13:19:57] <StephenLynx> It seems the error is ACTUALLY about the connection being shutdown by the server.
[13:20:08] <seiren> the collection.totalSize() returns 49136
[13:20:19] <StephenLynx> what is there between you and the server?
[13:20:23] <cheeser> yeah. document size errors are usually pretty obvious
[13:21:12] <seiren> Both the app and server are on the same machine with no passwords etc between them. There's another server using the same database, which has no issues.
[13:21:44] <seiren> one thing. I'm using express. I'm not closing the connection to mongo at the end of the response. Do you think that would make the difference?
[13:21:47] <StephenLynx> which mongo and node version are you running?
[13:25:28] <StephenLynx> you have 2 things to try:
[13:25:30] <seiren> but, the database call is made when a request hits express.
[13:25:52] <StephenLynx> yeah, but if you handle the driver directly, express has no chance to do anything with it.
[13:26:01] <StephenLynx> one is the TCP stack of the server.
[13:26:02] <seiren> and the only difference between working server and not working server is that the working server closes connection on express response end.
[13:27:11] <seiren> Yes. it is created on the beginning of the request.
[13:27:22] <StephenLynx> that is EXTREMELY inefficient.
[13:27:31] <StephenLynx> you want to open a connection and reuse it.
[13:27:39] <StephenLynx> and let the driver manage the connection pool internally.
[13:27:53] <StephenLynx> you might be exceeding the connection limit, maybe?
[13:28:31] <seiren> This is why i asked about closing the connection :). I'll move the connection to the database to the runtime of the server and see if that helps.
[13:28:52] <seiren> IT's frustrating, because it isn't a repeatable issue :/
[13:28:59] <StephenLynx> what do you mean move the connection to the runtime of the server?
[13:33:32] <seiren> The old codebase (before i worked here) was much worse. It wasn't just every request that made a connection. It was on every function that accessed the database.
[14:05:16] <mementomori> looks like it's not the first time: https://jira.mongodb.org/browse/SERVER-10871
[14:17:55] <mementomori> are those init scripts available online somewhere?
[14:46:14] <mementomori> since this chan is logged maybe someone will find useful this link: http://askubuntu.com/questions/767134/mongodb-3-2-6-init-script-is-missing
[15:14:28] <cheeser> i'm not sure 16 is a supported platform yet
[15:14:33] <benjwadams> How can i reduce/clean a mongo database? I'm used to vacuuming in postgres, I don't know what the rough mongo equivalent would be? `clean`? Is there anything that doesn't need a db wide write lock?
[17:00:12] <loadh> is it possible to find documents geographically near another document, give an ObjectId?
[17:00:46] <cheeser> you'd need actual geo coordinates
[17:01:01] <loadh> i'm perfectly able to conduct geoNear and near queries give a set of coords, what I'm asking is whether it's possible to query given the ObjectId
[17:01:17] <loadh> so it's not possible to find nearby documents?
[17:01:25] <loadh> seems like a fairly obvious requirement?
[17:03:44] <loadh> @cheeser so to conduct the query I want, I'd need to first find the document by ObjectId / _id, then get the coords from that doc, then do the search for all docs near those coords?
[17:39:31] <loadh> (for some reason I thought ObjectID was a Mongoose thing!)
[20:57:50] <energizer> I'd like to write programs on my personal computer that can affect my db on the remote server, and then transfer my code by git to the server when I'm satistfied with it.
[20:58:21] <energizer> But that means having code that can affect the database from home or from the server running the db.
[20:58:32] <energizer> Is there an approach for doing that?
[20:58:56] <energizer> How can I write code at home that will be run by the server?