php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59460 MongoDB presist connection not stable
Submitted: 2010-10-13 12:13 UTC Modified: 2012-11-29 17:40 UTC
From: tomasen at gmail dot com Assigned: derick (profile)
Status: Closed Package: mongo (PECL)
PHP Version: PHP 5.3.3 OS: FreeBSD 7.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tomasen at gmail dot com
New email:
PHP Version: OS:

 

 [2010-10-13 12:13 UTC] tomasen at gmail dot com
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)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-13 12:15 UTC] tomasen at gmail dot com
trying to fix typo
 [2010-10-13 12:15 UTC] tomasen at gmail dot com
correct version info
 [2012-02-26 08:50 UTC] rasmus@php.net
-Package: PECL bug system +Package: mongo
 [2012-11-29 17:40 UTC] derick@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

This should be fixed in the 1.3.0 release. If you continue finding problems with this, please file an issue in JIRA: http://jira.mongodb.org/browse/PHP
 [2012-11-29 17:40 UTC] derick@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: derick
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 08:01:29 2025 UTC