Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17878 программистов и 1567 роботов. Сейчас ищут 982 программиста ...
Приступая к работе

MongoPool::info - Returns information about all connection pools.

Вернуться к: MongoPool

MongoPool::info

(PECL mongo >= 1.2.3)

MongoPool::infoReturns information about all connection pools.

Описание

public array MongoPool::info ( void )

Returns an array of information about all connection pools.

Список параметров

У этой функции нет параметров.

Возвращаемые значения

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 Mongo 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.

total

The total number of connections allowed for this pool. This should be greater than or equal to "in use" + "in pool" (or -1).

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.

waiting

If you have capped the pool size, workers requesting connections from the pool may block until other workers return their connections. This field shows how many milliseconds workers have blocked for connections to be released. If this number keeps increasing, you may want to use MongoPool::setSize() to add more connections to your pool.

Список изменений

Версия Описание
1.2.11 Emits E_DEPRECATED when used.



Вернуться к: MongoPool

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware