[00:49:58] <peachblossom> Hi. Has anyone installed MongoDB on a shared filesystem ?
[04:01:01] <jason__> If I have files in MongoDB GridFS such as images that I wish to display on a web page, how should I serve them? Create a route in my web applications which retrieves them?
[04:49:29] <GothAlice> Nginx-gridfs is a method of using Nginx as a front-end server for GridFS stored assets.
[10:24:40] <nicvw> Hi, I have a question about pymongo and how its behaviour differs when using coroutines (gevent) instead of simple threads (threading).
[10:27:09] <nicvw> Basically I have built to small programs to simulate the behavior of the application I am working on. Both connect to a mongo replicaset (mongo 2.6.10), the only difference is one is using gevent to spawn a pool of workers and the other one using the builtin Python (2.7.9) threading module
[10:27:57] <nicvw> Both perform mostly finds with a find_and_modify thrown in every 10 seconds. Read preference is Primary.
[10:29:04] <nicvw> In the threaded example, when the primary node is disconnected from the network no reads or writes occur for a about 50 seconds, then the program resumes. This is the desired behavior.
[10:30:10] <nicvw> The program using gevent does NOT resume after this reasonable amount of time. It stalls for 15 minutes before any further transactions are able to be performed against the replicaset.
[10:32:01] <Rumbles> I'm trying to query mongo using pymongo to find the IP addresses of the secondaries, I hoped that I could find that information with MongoClient().nodes but that returns frozenset.... I guess I'm doing something wrong... https://paste.fedoraproject.org/477739/
[10:37:06] <Rumbles> I didn't see that in the docs: http://api.mongodb.com/python/current/api/pymongo/mongo_client.html#pymongo.mongo_client.MongoClient.nodes
[10:41:23] <qswz> what's the diff between $elemMatch https://docs.mongodb.com/v3.2/reference/operator/query/elemMatch/ and $or?
[10:41:56] <nicvw> given the info you pasted, you are connecting to a standalone mongo. you probably want to specify the replicaset in you instantiate MongoClient
[10:43:22] <Rumbles> if I connect to mongo and run rs.status() I can see the otherss
[10:46:41] <Rumbles> according to the config it's using a replsetname of dev, so I woudl expect MongoClient(replicaset='dev').secondaries to work, but I get set([]) still :/
[11:01:29] <nicvw> I suppose you could just use .admin.command('replSetGetStatus') and parse the output of that do get your secondaries... I have no idea why you can't get them using .secondaries
[11:03:18] <Rumbles> yeah that returns some useful info
[13:57:31] <kryl> hi, please how to try/catch an exception when I try to connect if the database is not up : I don't want to just get the error message and leave my program like that ! I use php 7
[13:57:58] <kryl> $mdb = new \MongoDB\Client; < for example deliver the message : Default exception : No suitable servers found (`serverselectiontryonce` set): [Failed connecting to 'localhost:27017': Connection refused] and immediately exit !
[13:58:13] <kryl> I want to catch the error and do some actions if you can help ?
[13:59:01] <kryl> I use "mongodb/mongodb": "^1.0.0" from composer on a high level layer to the php new driver with php 7 for information
[14:03:07] <StephenLynx> Derick, is it you that knows the PHP driver?
[15:27:35] <qswz> does it change something if I call MongoClient.connect once only and pass around db, or call MongoClient.connect multiple times in several files
[16:12:09] <teprrr> hmm, upserting some 60k documents with just <timestamp, string> has taken now already 20 minutes.. I must be doing something wrong here? I'm using bulk operation mode of pymongo (though my earlier bulk_write with bunch of updateones was the problem, but alas no.)
[16:12:20] <teprrr> any ideas how to debug that bottleneck?
[16:14:29] <teprrr> it must be the use of upsert though..
[16:14:42] <cheeser> yeah. every upsert does a query first.
[16:16:31] <teprrr> oh yeah. and I'm also logging all the queries it seems
[20:46:55] <TehGrub> so i have a bunch of points in a mongo collection and i'm using the $box to get back the points but i'm not getting anything back. does the $box support earth like coordinates at all?
[21:57:01] <blizzow> I have a sharded cluster with ~600million records across a couple collections within three DBs. We have I'm running mongo-connector to get all the data into a replica set with no sharding. I've let the system run for a couple days now and the record count isn't exactly the same between for databases between the two clusters.
[21:57:12] <blizzow> Is there a way to tell when the mongo-connector thinks it's close to being in sync?
[21:57:31] <teprrr> TehGrub: are your query values exact?
[21:57:41] <TehGrub> teprrr, heh. i got it working