<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Returns information about all connection pools.</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mongopool.getsize.html">MongoPool::getSize</a></div> <div class="next" style="text-align: right; float: right;"><a href="mongopool.setsize.html">MongoPool::setSize</a></div> <div class="up"><a href="class.mongopool.html">MongoPool</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="mongopool.info" class="refentry"> <div class="refnamediv"> <h1 class="refname">MongoPool::info</h1> <p class="verinfo">(PECL mongo >= 1.2.3)</p><p class="refpurpose"><span class="refname">MongoPool::info</span> — <span class="dc-title">Returns information about all connection pools.</span></p> </div> <div class="refsect1 description" id="refsect1-mongopool.info-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">array</span> <span class="methodname"><strong>MongoPool::info</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment"> Returns an array of information about all connection pools. </p> </div> <div class="refsect1 parameters" id="refsect1-mongopool.info-parameters"> <h3 class="title">Parameters</h3> <p class="para">This function has no parameters.</p> </div> <div class="refsect1 returnvalues" id="refsect1-mongopool.info-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Each connection pool has an identifier, which starts with the host. For each pool, this function shows the following fields: <dl> <dt> <span class="term"> <em><code class="parameter">in use</code></em> </span> <dd> <p class="para"> The number of connections currently being used by <a href="class.mongo.html" class="classname">Mongo</a> instances. </p> </dd> </dt> <dt> <span class="term"> <em><code class="parameter">in pool</code></em> </span> <dd> <p class="para"> The number of connections currently in the pool (not being used). </p> </dd> </dt> <dt> <span class="term"> <em><code class="parameter">remaining</code></em> </span> <dd> <p class="para"> 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 <a href="class.mongoclient.html" class="classname">MongoClient</a> before we exhausted this pool (assuming no instances of <a href="class.mongoclient.html" class="classname">MongoClient</a> went out of scope, returning their connections to the pool). </p> <p class="para"> A negative number means that this pool will spawn unlimited connections. </p> <p class="para"> Before a pool is created, you can change the max number of connections by calling <span class="function"><a href="mongo.setpoolsize.html" class="function">Mongo::setPoolSize()</a></span>. Once a pool is showing up in the output of this function, its size cannot be changed. </p> </dd> </dt> <dt> <span class="term"> <em><code class="parameter">total</code></em> </span> <dd> <p class="para"> The total number of connections allowed for this pool. This should be greater than or equal to "in use" + "in pool" (or -1). </p> </dd> </dt> <dt> <span class="term"> <em><code class="parameter">timeout</code></em> </span> <dd> <p class="para"> 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. </p> </dd> </dt> <dt> <span class="term"> <em><code class="parameter">waiting</code></em> </span> <dd> <p class="para"> 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 <span class="function"><a href="mongopool.setsize.html" class="function">MongoPool::setSize()</a></span> to add more connections to your pool. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 changelog" id="refsect1-mongopool.info-changelog"> <h3 class="title">Changelog</h3> <p class="para"> <table class="doctable informaltable"> <thead> <tr> <th>Version</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>1.2.11</td> <td>Emits <strong><code>E_DEPRECATED</code></strong> when used.</td> </tr> </tbody> </table> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mongopool.getsize.html">MongoPool::getSize</a></div> <div class="next" style="text-align: right; float: right;"><a href="mongopool.setsize.html">MongoPool::setSize</a></div> <div class="up"><a href="class.mongopool.html">MongoPool</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>