-
Notifications
You must be signed in to change notification settings - Fork 209
Closed
Labels
Description
Description
Driver causes memory leak for the collections with at least 9998 docs (9997 docs work fine).
Environment
Ubuntu 16.04 x64
PHP 7.1.0
mongodb 1.2.3
$ php -i | grep -E 'mongodb|libmongoc|libbson'
mongodb
libbson bundled version => 1.5.3
libmongoc bundled version => 1.5.3
libmongoc SSL => enabled
libmongoc SSL library => OpenSSL
libmongoc crypto => enabled
libmongoc crypto library => libcrypto
libmongoc crypto system profile => disabled
libmongoc SASL => disabled
mongodb.debug => no value => no value
Test Script
<?php
$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;
}
Debug (9997 docs): http://kostin.info/9997.zip (1.5Mb)
Debug (9998 docs): http://kostin.info/9998.zip (1.5Mb)