Bug #73845 [NEW]: pg_connect()/pg_close() memory leak
| From: | miloslav dot hula at gmail dot com | Date: | Fri, 30 Dec 2016 17:50:27 +0000 |
| Subject: | Bug #73845 [NEW]: pg_connect()/pg_close() memory leak | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-206247@lists.php.net to get a copy of this message | ||
From: miloslav dot hula at gmail dot com
Operating system: Windows 10
PHP version: 7.1.0
Package: PostgreSQL related
Bug Type: Bug
Bug description:pg_connect()/pg_close() memory leak
Description:
------------
Memory remains occupied (24 bytes) after pg_connect()/pg_close() call.
Calling gc_collect_cycles() does not help.
It kills our daemon script which connects/disconnects to database.
Isolated on Windows 10 but happens on Debian with PHP 5.6.
Test script:
---------------
for ($i = 0; $i < 500; $i++) {
echo "$i: " . memory_get_usage()."\n";
pg_close(pg_connect("host=localhost dbname=test"));
}
--
Edit bug report at https://bugs.php.net/bug.php?id=73845&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73845&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73845&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73845&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73845&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73845&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73845&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73845&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73845&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73845&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73845&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73845&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73845&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73845&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73845&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73845&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73845&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73845&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73845&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73845&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73845&r=mysqlcfg