From 2f1d7e2f492a77bb24bccef687c1881c93a9958e Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 16 Apr 2012 14:19:29 +0000 Subject: [PATCH] Fixed close documentation. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@325230 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/mongo/close.xml | 43 +++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/reference/mongo/mongo/close.xml b/reference/mongo/mongo/close.xml index 55341b68bb..b5ab2c8273 100644 --- a/reference/mongo/mongo/close.xml +++ b/reference/mongo/mongo/close.xml @@ -14,16 +14,9 @@ - This method does not need to be called, except in unusual - circumstances. The driver will cleanly close the database - connection when this Mongo instance goes out of scope. - - - If objects do not go out of scope between requests, you may wish to call - this method at the end of your program to keep old connections from hanging - around. However, it is probably more efficient use a persistent connection, - which will automatically create a connection if needed and use it for as - many requests as possible. + The close method forcefully closes a connection to the + database, even if persistent connections are being used. You do under + normal circumstance never have to do this. If you are connected to a replica set, close() will only close the connection @@ -42,6 +35,36 @@ Returns if the connection was successfully closed. + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 1.2.0 + + + Before version 1.2.0 the driver would not use persistent connections + by default, and all connections would be closed as soon as a MongoDB + connection went out if scope. Since version 1.2.0 this is no longer + the case and it is a bad idea to call close as you might end up + overloading the server with connections under high load. + + + + + + + +