<!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="mongo.getslaveokay.html">Mongo::getSlaveOkay</a></div> <div class="next" style="text-align: right; float: right;"><a href="mongo.setpoolsize.html">Mongo::setPoolSize</a></div> <div class="up"><a href="class.mongo.html">Mongo</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="mongo.pooldebug" class="refentry"> <div class="refnamediv"> <h1 class="refname">Mongo::poolDebug</h1> <p class="verinfo">(PECL mongo >=1.2.0)</p><p class="refpurpose"><span class="refname">Mongo::poolDebug</span> — <span class="dc-title">Returns information about all connection pools.</span></p> </div> <div class="refsect1 description" id="refsect1-mongo.pooldebug-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>Mongo::poolDebug</strong></span> ( <span class="methodparam">void</span> )</div> <div class="warning"><strong class="warning">Warning</strong> <p class="simpara">This feature has been <em class="emphasis">DEPRECATED</em> as of version 1.2.3. Relying on this feature is highly discouraged. Please use <span class="function"><a href="mongopool.info.html" class="function">MongoPool::info()</a></span> instead. </p> </div> <p class="para"> Returns an array of information about all connection pools. </p> </div> <div class="refsect1 parameters" id="refsect1-mongo.pooldebug-parameters"> <h3 class="title">Parameters</h3> <p class="para">This function has no parameters.</p> </div> <div class="refsect1 returnvalues" id="refsect1-mongo.pooldebug-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.mongoclient.html" class="classname">MongoClient</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">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> </dl> </p> </div> <div class="refsect1 changelog" id="refsect1-mongo.pooldebug-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="mongo.getslaveokay.html">Mongo::getSlaveOkay</a></div> <div class="next" style="text-align: right; float: right;"><a href="mongo.setpoolsize.html">Mongo::setPoolSize</a></div> <div class="up"><a href="class.mongo.html">Mongo</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>