#19213 [Opn->Fbk]: Adabas odbc Memory leak

From: Date: Tue, 03 Sep 2002 23:04:48 +0000
Subject: #19213 [Opn->Fbk]: Adabas odbc Memory leak
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18346@lists.php.net to get a copy of this message
ID: 19213 Updated by: kalowsky@php.net Reported By: a.steckenborn@stebosoft.de -Status: Open +Status: Feedback Bug Type: Adabas-D related Operating System: SuSE Linux 8.0 PHP Version: 4.2.2 New Comment: Everything looks good in your sample script. Any chance you can test out the latest snapshot for 4.2.3? There were a handful of memory fixes added to it, which might clean up your problem a bit. Although I don't think it will take all of it away. Previous Comments: ------------------------------------------------------------------------ [2002-09-03 17:59:18] a.steckenborn@stebosoft.de $conn1= @ODBC_Connect("CUST",$USER,$PASSWORD); ------------------------------------------------------------------------ [2002-09-03 17:39:26] kalowsky@php.net what odbc connection call? ------------------------------------------------------------------------ [2002-09-03 17:23:14] a.steckenborn@stebosoft.de this is my /var/spool/sql/config/odbc.ini ++++++++++++++++++++++++++++++++++++++++++ [LM] DSN = 192.168.10.5:LM SERVERDB = LM SERVER = adabas1 SERVERNODE = 192.168.10.5 [CUST] DSN = 192.168.10.2:CUST SERVERDB = CUST SERVER = server SERVERNODE = 192.168.10.2 ++++++++++++++++++++++++++++++++++++++++++++ This is a little script that takes between 24k and 40k Memory: <? include("include/ODBC_Connect.phtml"); if ($where == null) { $where="";} if ($conn1) { $sql = "select VA_STARTCODE,VA_NAME from R_VERANSTALTER where LAST_ACTIV <>'N' and LAST_ART <>'NF' ".$where1; $sql .= " order by VA_STARTCODE DESC "; $res = ODBC_Exec($conn1,$sql); if ($res) { while (ODBC_Fetch_Row($res)) { $a = ODBC_Result($res,1); $b = ODBC_Result($res,2); printf("%s %s\n",$a,$b); } ODBC_Free_Result($res); } ODBC_Close($conn1); } ?> without the odbc connect it takes no Memory away. ------------------------------------------------------------------------ [2002-09-03 16:05:43] edink@php.net As a temporary workaround you can set MaxRequestsPerChild 100 in your apache configuration. ------------------------------------------------------------------------ [2002-09-03 13:26:46] a.steckenborn@stebosoft.de With each connection to our Database over PHP Script the used Memory of our HTTP childs is growing up. At the beginning the Memory is around 2000k per Child. After 3 Days around 50MB per child. After 5 Days the System is using 300 MB Swap and crashes. I'm working with this Problem longer than 8 month now, but i cant't find out what it is. Before our Webserver was SuSE Linux 6.0. I've updated now to 8.0, newest Apache 1.x newest PHP. Our Webserver with PHP and Adabas D 11.01 for Customer Database with small tables. Seperate Database Machine (SuSE 8.0) for big tables. We are using ODBC_Free_Result($res) and ODBC_Close ($conn) in all Scripts but the used memory will grow around 80k up per result. I hope that you can help me to fix this bug. Dear Albert Steckenborn ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19213&edit=1

« previous php.bugs (#18346) next »