php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73845 pg_connect()/pg_close() memory leak
Submitted: 2016-12-30 17:50 UTC Modified: 2017-11-08 18:08 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: miloslav dot hula at gmail dot com Assigned:
Status: Duplicate Package: PostgreSQL related
PHP Version: 7.1.0 OS: Windows 10
Private report: No CVE-ID: None
 [2016-12-30 17:50 UTC] miloslav dot hula at gmail dot com
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"));
}



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-11-08 18:08 UTC] ab@php.net
-Status: Open +Status: Duplicate
 [2017-11-08 18:08 UTC] ab@php.net
Fixed in the scope of bug #75419.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC