[Pi3web-users] Memory problem with PHP
Brought to you by:
zimpel
From: <lde...@ho...> - 2004-10-12 14:23:21
|
Hi, I'm using PI3Web with PHP 4.3.8.8 on win32 based system. PI3Web is running as a service. I'm using "TaskInfo" program (http://www.iarsn.com/) to analyse CPU and Memory usage. My script allocate a big array for its treatments. Each time the script is called, the PI3Srv32 process is allocating memory that appear in the "Total KB" column in TaskInfo. The memory is not restored. When the "Total KB" memory count reach 2 GB, the PI3Srv32 process is automatically stopped by the system, so my application is down. I have found a work around that consist to check "Reuse thread" option of the PI3Web server. In this configuration, the memory usage doesn't increase any more, but the PI3Srv32 process is using 100% of CPU usage. I prefer this solution that doesn't crash my application, but I think there something wrong on my system. Here is the PHP script I'm using to test this problem. <?php $memBlock = array(); for($i = 0; $i < 1000000; $i ++) { $memBlock[] = "abcdefghijklmnopqrstuvwxyz"; } $memBlock = NULL; unset($memBlock); echo "OK"; ?> Any idea ? Thank you. Luc. |