ID:               35646
 Updated by:       [EMAIL PROTECTED]
 Reported By:      vovik at getart dot ru
-Status:           Open
+Status:           Bogus
 Bug Type:         Apache2 related
 Operating System: RHEL 4
 PHP Version:      4.4.1
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Memory isn't _really_ freed but during shutdown.


Previous Comments:
------------------------------------------------------------------------

[2005-12-12 14:51:17] vovik at getart dot ru

Description:
------------
I using 'LogFormat "%h %l %u %t \"%r\" %>s %b
php(%{mod_php_memory_usage}n)" common' in httpd.conf for logging php
memory usage.

If php script exited on fatal error due to memory limitation,
%{mod_php_memory_usage}n keeps high value for all following requests to
this apache child.

Reproduce code:
---------------
if (@$_GET["test"] == 1) {
    print "Allocated: ".memory_get_usage();

} else {
    ini_set("memory_limit", 1048576 * 100); // 100K

    // PHP exited in file_get_contents with message:
    // PHP Fatal error:  Allowed memory size of 104857600 bytes
exhausted
    $bigfile = file_get_contents("/etc/termcap"); // this file is about
800K on my host
}

First, run this script without parameter, next with ?test=1. Check
apache log then.

Expected result:
----------------
[12/Dec/2005:13:28:47 +0000] "GET /test.php HTTP/1.1" 200 -
php(806944)
[12/Dec/2005:13:28:57 +0000] "GET /test.php?test=1 HTTP/1.1" 200 16
php(*****) // not the same as previous, should be much lower

Actual result:
--------------
[12/Dec/2005:13:28:47 +0000] "GET /test.php HTTP/1.1" 200 -
php(806944)
[12/Dec/2005:13:28:57 +0000] "GET /test.php?test=1 HTTP/1.1" 200 16
php(806944)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35646&edit=1

Reply via email to