PHP 4.0 Bug #8561: memory leak

From: Date: Fri, 05 Jan 2001 09:04:42 +0000
Subject: PHP 4.0 Bug #8561: memory leak
Groups: php.dev 
Request: Send a blank email to php-dev+get-43020@lists.php.net to get a copy of this message
From: fresh22@hitel.net Operating system: SunOS 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-Enterprise PHP version: 4.0.4 PHP Bug Type: OCI8 related Bug description: memory leak I dunno whether it's the php memory management's problem, the phplib's problem, or my coding's problem. Apparently, I'm facing a memory leak's problem that has no solution at all until now. Please help if someone faced the same situation before. When I run follow script using OCI8 function, this script use a lot of system memory. when a large number of user access this script, the httpd is running extremely wierd exactly heap size. The memory usage is kept on increasing without stopping. Environment : Oracle8.1.5 script : <?php $conn = OCILogon("scott","tiger"); if(!$conn) { echo "ocilogon1 error\n\n"; exit; } $query = "select userno from chkuser "; $query .= " where kname = 'test' "; $stmt = OCIParse($conn,$query); OCIExecute($stmt); OCIFetchInto($stmt,$CHKUSER,OCI_ASSOC); $usernum = $CHKUSER["USERNO"]; OCIFreeStatement($stmt); OCILogoff($conn); echo $usernum." --test break1 \n"; ?> command for checking memory : pmap -x 26749(pid) other command for checking memory : ps -ef -o pid -o vsz -o rss -o fname -o args | grep httpd | sort before running above script : 26749 10704 4168 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd 26752 10704 1808 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd 26753 10704 1784 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd 26754 10704 1784 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd 26755 10704 1784 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd 26756 10704 1784 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd after running above script : 26749 10704 4168 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd 26752 10888 6360 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd 26753 10888 6360 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd 26754 10888 6360 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd 26755 10704 1808 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd 26756 10704 1784 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd 28154 10712 1792 libhttpd /H2K/HiTEL2000/webservice/apache/bin/httpd -- Edit Bug report at: http://bugs.php.net/?id=8561&edit=1

« previous php.dev (#43020) next »