[PECL-BUG] Bug #19071 [NEW]: MongoDB presist connection not stable

[email protected] ("tomasen at gmail dot com") 13 Oct 2010 16:13:49 -0000
Newsgroups php.pear.webmaster
Message-ID <[email protected]>
From:             tomasen at gmail dot com
Operating system: FreeBSD 7.1
Package version:  
PHP version:      Trunk SVN-2010-10-13 (dev)
Package:          Bug System
Bug Type:         Bug
Bug description:  MongoDB presist connection not stable

Description:
------------
In fact I'm using PHP 5.3.3

persistent connections to mongodb doesn't seem to be stable enough. 

after few days, I encounter exception as "couldn't send query" and nothing
works with mongodb. the serious problem is,  the connect doesn't seems to
be able to fix or reconnect by itself.

After I change the persist connect key. or switch to non-persist
connection, everything works.

maybe lack of automatic reconnection once break?
or meybe there can be too many opened persist connection to mongodb and
exceed the limit



Reproduce code:
---------------
$m = new Mongo("mongodb:///tmp/mongodb-27017.sock", array("persist" =>
"anykey")); 

// anything operate data



Expected result:
----------------
 PHP Fatal error:  Uncaught exception 'MongoCursorException' with message
'couldn't send query.' in /data/www/2006/counter/jsc.php:39
Stack trace:
#0 /data/www/2006/counter/jsc.php(39): MongoCollection->findOne(Array,
Array)


-- 
Edit bug report at http://pecl.php.net/bugs/bug.php?id=19071&edit=1
--