|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 05:00:01 2025 UTC |
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