update : 2015.11.03
php.shukuma.com검색:
|
MongoPool::setSize(PECL mongo >= 1.2.3) MongoPool::setSize — Set the size for future connection pools. 설명
public static bool MongoPool::setSize
( int
$size
)Sets the max number of connections new pools will be able to create. 인수
반환값Returns the former value of pool size. 변경점
예제
Example #1 Mongo::setPoolSize() example If you set the pool size to n and then create n connections, attempting to create an n+1st connection will throw a MongoConnectionException.
<?php 위 예제의 출력 예시: Fatal error: Uncaught exception 'MongoConnectionException' with message 'no more connections in pool' in /path/to/php/script.php:10 Stack trace: #0 /path/to/php/script.php(10): Mongo->__construct() #1 {main} thrown in /path/to/php/script.php on line 10 참고
|