downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Mongo::connect> <Mongo
[edit] Last updated: Fri, 18 May 2012

view this page in

Mongo::close

(PECL mongo >=0.9.0)

Mongo::closeCloses this connection

Beschreibung

public bool Mongo::close ( void )

The Mongo::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 to the primary.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Returns if the connection was successfully closed.

Changelog

Version Beschreibung
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.



add a note add a note User Contributed Notes Mongo::close
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites