-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.2.3
-
Component/s: None
-
None
-
Environment:Ubuntu 16.04 x64
PHP 7.1.0
The following code shows memory leakage for collection that has more than 9997 docs.
$mongo = new \MongoDB\Driver\Manager("mongodb://username:password@127.0.0.1:27017/dbname"); $query = new \MongoDB\Driver\Query([]); while (true) { $mongo->executeQuery('dbname.test', $query)->toArray(); echo memory_get_peak_usage() . PHP_EOL; }
db.test.drop(); for (var i = 0; i < 9998; ++i) {db.test.insert({x: "y"});}
$ php index.php 15881112 17801272 19720888 21640504 23560120 25479736 27399352 29318968 31238584 33158200 35077816 36997432 38917048 40836664 42756280 44675896 46595512 48515128 50434744
db.test.drop(); for (var i = 0; i < 9997; ++i) {db.test.insert({x: "y"});}
$ php index.php 15880312 15880312 15880312 15880312 15880312 15880312 15880312 15880312 15880312 15880312 15880312 15880312 15880312 15880312
- is related to
-
PHPC-460 BSON classes should support PHP serialization and var_export()
- Closed
- related to
-
PHPC-939 BSON classes should not assign public properties after var_dump()
- Closed
-
PHPC-1598 Objects with get_properties handlers should have get_gc delegate to zend_std_get_properties
- Closed
- links to