|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-09-03 13:26 UTC] a dot steckenborn at stebosoft dot 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
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.$conn1= @ODBC_Connect("CUST",$USER,$PASSWORD);Here you can see how the used memory grows up: Memory usage of http childs 20020904 03:00PM 26074 wwwrun 13 0 6604 6604 3644 S 0.0 1.2 0:00 httpd 26069 wwwrun 20 0 6380 6380 3624 S 0.0 1.2 0:00 httpd 26073 wwwrun 20 0 6060 6060 3476 S 0.0 1.1 0:01 httpd 26077 wwwrun 20 0 5904 5904 3436 S 0.0 1.1 0:00 httpd 26070 wwwrun 20 0 5272 5272 3616 S 0.0 1.0 0:00 httpd 26071 wwwrun 20 0 5112 5112 3632 S 0.0 0.9 0:00 httpd 26078 wwwrun 20 0 4640 4640 3472 S 0.0 0.9 0:00 httpd 26072 wwwrun 20 0 4552 4552 3616 S 0.0 0.8 0:00 httpd 26076 wwwrun 20 0 4436 4436 3464 S 0.0 0.8 0:00 httpd 26075 wwwrun 20 0 4368 4368 3432 S 0.0 0.8 0:00 httpd 26302 wwwrun 20 0 4136 4136 3416 S 0.0 0.8 0:00 httpd 26298 wwwrun 20 0 4064 4064 3420 S 0.0 0.7 0:00 httpd 26068 root 20 0 2828 2828 2620 S 0.0 0.5 0:00 httpd +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Memory usage of http childs 20020904 08:00PM 26071 wwwrun 20 0 11288 11M 3704 S 0.0 2.1 0:06 httpd 26070 wwwrun 20 0 10392 10M 3680 S 0.0 2.0 0:05 httpd 26076 wwwrun 19 0 9444 9444 3556 S 0.0 1.8 0:05 httpd 26073 wwwrun 19 0 9252 9252 3540 S 0.0 1.8 0:06 httpd 26072 wwwrun 20 0 9232 9232 3680 S 0.0 1.7 0:05 httpd 26074 wwwrun 20 0 9160 9160 3688 S 0.0 1.7 0:04 httpd 26069 wwwrun 20 0 9048 9048 3696 S 0.0 1.7 0:05 httpd 26075 wwwrun 19 0 8712 8712 3528 S 0.0 1.6 0:05 httpd 26456 wwwrun 19 0 8504 8504 3544 S 0.0 1.6 0:04 httpd 26298 wwwrun 20 0 8468 8468 3552 S 0.0 1.6 0:04 httpd 26077 wwwrun 20 0 8404 8404 3544 S 0.0 1.6 0:07 httpd 26078 wwwrun 20 0 8256 8256 3532 S 0.0 1.6 0:05 httpd 26458 wwwrun 20 0 7960 7960 3540 S 0.0 1.5 0:04 httpd 26302 wwwrun 19 0 7860 7860 3548 S 0.0 1.5 0:03 httpd 26457 wwwrun 20 0 7828 7828 3552 S 0.0 1.5 0:03 httpd 26068 root 20 0 2828 2828 2500 S 0.0 0.5 0:00 httpd result of free total used free shared buffers cached Mem: 513500 507896 5604 0 181692 176276 -/+ buffers/cache: 149928 363572 Swap: 1052248 332 1051916 Next follows tomorrow morning (German Time) rgds. Albert