{"action":"opened","issue":{"url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/437","repository_url":"https://api.github.com/repos/mongodb/mongo-php-library","labels_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/437/comments","events_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/437/events","html_url":"https://github.com/mongodb/mongo-php-library/issues/437","id":276310221,"number":437,"title":"Non-persistant connections?","user":{"login":"lifewcody","id":13125268,"avatar_url":"https://avatars3.githubusercontent.com/u/13125268?v=4","gravatar_id":"","url":"https://api.github.com/users/lifewcody","html_url":"https://github.com/lifewcody","followers_url":"https://api.github.com/users/lifewcody/followers","following_url":"https://api.github.com/users/lifewcody/following{/other_user}","gists_url":"https://api.github.com/users/lifewcody/gists{/gist_id}","starred_url":"https://api.github.com/users/lifewcody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifewcody/subscriptions","organizations_url":"https://api.github.com/users/lifewcody/orgs","repos_url":"https://api.github.com/users/lifewcody/repos","events_url":"https://api.github.com/users/lifewcody/events{/privacy}","received_events_url":"https://api.github.com/users/lifewcody/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-23T09:33:51Z","updated_at":"2017-11-23T09:33:51Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI know the mongodb lib is supposed to hash the connection and then re-use it, but in mongodb after every request it shows \"1 connection now open\"\r\n\"2 connections now open\" and it keeps going on. This doesn't seem persistent to me.\r\n\r\nI am using the latest Mongo PHP Library (1.2.0)\r\nAnd I am using 1.3.2 of the Mongodb PHP lib\r\n\r\nFor every file it creates a new connection. So if I want in GridFS test.iso it will persist and use that connection but test.docx will open another connection.\r\n\r\nCode I'm using to opening:\r\n```\r\n$conn = new MongoDB\\Client();\r\n$bucket = $conn->selectDatabase(\"application\")->selectGridFSBucket(array(\"bucketName\" => $id));\r\n```\r\nI'm using the same bucket name for both files.\r\n\r\nIn MondoDB when i type db.serverStatus().connections \"current\" increases and doesn't go down. Also \"available\" decreases every time I upload a new file. I know this isn't intentional, or hope it isn't.\r\n"}}
{"actor":{"display_login":"lifewcody"}}