php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59661 Memory leak when run through apache
Submitted: 2011-03-10 11:13 UTC Modified: 2015-04-05 04:22 UTC
From: elm dot morrow at allegiantair dot com Assigned:
Status: No Feedback Package: ibm_db2 (PECL)
PHP Version: 5.2.5 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: elm dot morrow at allegiantair dot com
New email:
PHP Version: OS:

 

 [2011-03-10 11:13 UTC] elm dot morrow at allegiantair dot com
Description:
------------
Whenever I create a db connection (db2_connect) in an apache-based process even after I close the connection I never get the memory back.  This can cause severe issues if ad-hoc connections are created on a long-running apache child process.

NOTE: I was asked to post this by IBM driver developer Praveen Devarao back on 1/27/11.

Reproduce code:
---------------
I don't have a publicly-available URL I can point you to to reproduce this.  However, I do have code that can make this happen but it's more than 20 lines of code all-told.

Please advise.

Expected result:
----------------
All memory used to create db2 connection should be released.

Actual result:
--------------
Memory is not released.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-14 07:26 UTC] abhargav at in dot ibm dot com
Hi Elm,

I tried following test case to repro the problem:

<?php
$user = "db2inst1";
$pass = "secret";
$mydb = "phpdb";
$port = 60020;
$host = "localhost";

$dsn  = "DATABASE=$mydb;UID=$user;PWD=$pass;PORT=$port;HOSTNAME=$host;PROTOCOL=TCPIP;";

$i = 0;

while($i < 50000) {
 $conn = db2_connect($dsn, "", "");
 $i = $i + 1;
 echo "$i, ";
}
echo "\nTesting Done\n";
?>

When this test is running, I don't see any mem usage shoot up for the apache process.

>>>
I do have code that can make this happen but it's more than 20 lines of code all-told.
<<<
You can paste your test case to this thread itself. 

Regards,
Ambrish Bhargava
 [2015-03-23 19:35 UTC] cmb@php.net
-Status: Open +Status: Feedback
 [2015-03-23 19:35 UTC] cmb@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
 [2015-04-05 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Mar 23 15:01:26 2019 UTC