Mongo::poolDebug
(PECL mongo >=1.2.0)
Mongo::poolDebug — Returns information about all connection pools.
Description
This feature has been DEPRECATED as of version 1.2.3. Relying on this feature is highly discouraged. Please use MongoPool::info() instead.
Returns an array of information about all connection pools.
Parameters
This function has no parameters.
Return Values
Each connection pool has an identifier, which starts with the host. For each pool, this function shows the following fields:
-
in use
-
The number of connections currently being used by MongoClient instances.
-
in pool
-
The number of connections currently in the pool (not being used).
-
remaining
-
The number of connections that could be created by this pool. For example, suppose a pool had 5 connections remaining and 3 connections in the pool. We could create 8 new instances of MongoClient before we exhausted this pool (assuming no instances of MongoClient went out of scope, returning their connections to the pool).
A negative number means that this pool will spawn unlimited connections.
Before a pool is created, you can change the max number of connections by calling Mongo::setPoolSize(). Once a pool is showing up in the output of this function, its size cannot be changed.
-
timeout
-
The socket timeout for connections in this pool. This is how long connections in this pool will attempt to connect to a server before giving up.
Changelog
Version | Description |
---|---|
1.2.11 | Emits E_DEPRECATED when used. |
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для работы с базами данных
- Расширения для работы с базами данных отдельных производителей
- MongoDB
- Дополнительно
- Функция Mongo::connectUtil() - Connects with a database server
- Функция Mongo::__construct() - The __construct purpose
- Функция Mongo::getPoolSize() - Get pool size for connection pools
- Функция Mongo::getSlave() - Returns the address being used by this for slaveOkay reads
- Функция Mongo::getSlaveOkay() - Get slaveOkay setting for this connection
- Функция Mongo::poolDebug() - Returns information about all connection pools.
- Функция Mongo::setPoolSize() - Set the size for future connection pools.
- Функция Mongo::setSlaveOkay() - Change slaveOkay setting for this connection
- Функция Mongo::switchSlave() - Choose a new secondary for slaveOkay reads
Коментарии
404 Not Found