#40770 [NEW]: Apache child exits when PHP memory limit reached

Ask a Question related to PHP Bugs, Design and Development.

  1. #1

    Default #40770 [NEW]: Apache child exits when PHP memory limit reached

    From: php at edwardk dot info
    Operating system: Windows 2003
    PHP version: 5.2.1
    PHP Bug Type: Reproducible crash
    Bug description: Apache child exits when PHP memory limit reached

    Description:
    ------------
    Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit

    The following PHP code was called from a browser with the size=149 (to
    simulate 149MB use) and the PHP memory limit is 160M.


    Reproduce code:
    ---------------
    <?
    ini_set('display_errors',true);
    if (isset($_GET['size']) && $_GET['size'] < 200) {
    $mb = intval($_GET['size']);
    }
    else {
    $mb=5;
    }
    $var = '';
    echo 'Memory limit: '.ini_get('memory_limit').'<br>';
    for ($i=0; $i<=$mb; $i++) {
    $var.= str_repeat('a',1*1024*1024);
    echo memory_get_usage().'<br>';
    }
    echo 'String length: '. strlen($var);
    ?>

    Expected result:
    ----------------
    PHP should, if it did run out of memory, exit with something along the
    lines of

    Fatal error: Allowed memory size of xxx bytes exhausted (tried to
    allocate yyy bytes)

    otherwise, the script should execute without crashing.

    Actual result:
    --------------
    Apache child exits, browser waiting for the result of the page get a TCP
    connection reset and no page loaded.

    --
    Edit bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40770&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40770&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40770&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40770&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=40770&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=40770&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40770&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=40770&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=40770&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=40770&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=40770&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=40770&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=40770&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40770&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=40770&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=40770&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40770&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=40770&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40770&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40770&r=mysqlcfg[/url]
    php at edwardk dot info Guest

  2. Similar Questions and Discussions

    1. "lipping path limit reached for TIFF Preview" error message
      Has anyone encounter the error, "Clipping path limit reached for TIFF Preview," when saving and Illustrator CD file as EPS? I've created a fairly...
    2. Reached Fireworks Limit??
      Please refer to your post message. I make a few suggestion. Try NOT to duplicate posts for same topic and try to be more specific next time around!...
    3. The network BIOS command limit has been reached??
      When i add a virtual directory, a warning come up in event log. "The Server was unable to add the virtual root '/cgi-bin' for the directory...
    4. The server has reached the maximum recovery limit for the application during...
      Hi NG, sometimes I bekome a "Server Application Error" on my w2k Server when call a ASP page The server has reached the maximum recovery limit...
    5. function exits/returns - does it free up memory?
      Randell D. wrote: If you're passing around large amounts of data you may want to read up on using references, which are functionaly analygous to...
  3. #2

    Default #40770 [Opn->Fbk]: Apache child exits when PHP memory limit reached

    ID: 40770
    Updated by: [email]iliaa@php.net[/email]
    Reported By: php at edwardk dot info
    -Status: Open
    +Status: Feedback
    Bug Type: Reproducible crash
    Operating System: Windows 2003
    PHP Version: 5.2.1
    New Comment:

    Are you running debug build of PHP by any chance?


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

    [2007-03-10 03:24:58] php at edwardk dot info

    Description:
    ------------
    Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit

    The following PHP code was called from a browser with the size=149 (to
    simulate 149MB use) and the PHP memory limit is 160M.


    Reproduce code:
    ---------------
    <?
    ini_set('display_errors',true);
    if (isset($_GET['size']) && $_GET['size'] < 200) {
    $mb = intval($_GET['size']);
    }
    else {
    $mb=5;
    }
    $var = '';
    echo 'Memory limit: '.ini_get('memory_limit').'<br>';
    for ($i=0; $i<=$mb; $i++) {
    $var.= str_repeat('a',1*1024*1024);
    echo memory_get_usage().'<br>';
    }
    echo 'String length: '. strlen($var);
    ?>

    Expected result:
    ----------------
    PHP should, if it did run out of memory, exit with something along the
    lines of

    Fatal error: Allowed memory size of xxx bytes exhausted (tried to
    allocate yyy bytes)

    otherwise, the script should execute without crashing.

    Actual result:
    --------------
    Apache child exits, browser waiting for the result of the page get a
    TCP connection reset and no page loaded.


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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
    iliaa@php.net Guest

  4. #3

    Default #40770 [Fbk->Opn]: Apache child exits when PHP memory limit reached

    ID: 40770
    User updated by: php at edwardk dot info
    Reported By: php at edwardk dot info
    -Status: Feedback
    +Status: Open
    Bug Type: Reproducible crash
    Operating System: Windows 2003
    PHP Version: 5.2.1
    New Comment:

    I don't believe so. It should be the official PHP 5.2.1 windows binary
    release.

    phpinfo() reports:


    PHP Version 5.2.1
    Build Date Feb 7 2007 23:10:31
    Configure Command cscript /nologo configure.js
    "--enable-snapshot-build" "--with-gd=shared"


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

    [2007-03-11 14:52:57] [email]iliaa@php.net[/email]

    Are you running debug build of PHP by any chance?

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

    [2007-03-10 03:24:58] php at edwardk dot info

    Description:
    ------------
    Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit

    The following PHP code was called from a browser with the size=149 (to
    simulate 149MB use) and the PHP memory limit is 160M.


    Reproduce code:
    ---------------
    <?
    ini_set('display_errors',true);
    if (isset($_GET['size']) && $_GET['size'] < 200) {
    $mb = intval($_GET['size']);
    }
    else {
    $mb=5;
    }
    $var = '';
    echo 'Memory limit: '.ini_get('memory_limit').'<br>';
    for ($i=0; $i<=$mb; $i++) {
    $var.= str_repeat('a',1*1024*1024);
    echo memory_get_usage().'<br>';
    }
    echo 'String length: '. strlen($var);
    ?>

    Expected result:
    ----------------
    PHP should, if it did run out of memory, exit with something along the
    lines of

    Fatal error: Allowed memory size of xxx bytes exhausted (tried to
    allocate yyy bytes)

    otherwise, the script should execute without crashing.

    Actual result:
    --------------
    Apache child exits, browser waiting for the result of the page get a
    TCP connection reset and no page loaded.


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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
    php at edwardk dot info Guest

  5. #4

    Default #40770 [Opn->Ver]: Apache child exits when PHP memory limit reached

    ID: 40770
    Updated by: [email]edink@php.net[/email]
    Reported By: php at edwardk dot info
    -Status: Open
    +Status: Verified
    Bug Type: Reproducible crash
    Operating System: Windows 2003
    PHP Version: 5.2.1
    New Comment:

    I can reproduce the problem. When running this example in CLI PHP
    aborts with:

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
    allocate 133169153 bytes) in C:\php4build\PHP_5_2\Release_TS\t.php on
    line 12
    zend_mm_heap corrupted



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

    [2007-03-11 21:35:14] php at edwardk dot info

    I don't believe so. It should be the official PHP 5.2.1 windows binary
    release.

    phpinfo() reports:


    PHP Version 5.2.1
    Build Date Feb 7 2007 23:10:31
    Configure Command cscript /nologo configure.js
    "--enable-snapshot-build" "--with-gd=shared"

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

    [2007-03-11 14:52:57] [email]iliaa@php.net[/email]

    Are you running debug build of PHP by any chance?

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

    [2007-03-10 03:24:58] php at edwardk dot info

    Description:
    ------------
    Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit

    The following PHP code was called from a browser with the size=149 (to
    simulate 149MB use) and the PHP memory limit is 160M.


    Reproduce code:
    ---------------
    <?
    ini_set('display_errors',true);
    if (isset($_GET['size']) && $_GET['size'] < 200) {
    $mb = intval($_GET['size']);
    }
    else {
    $mb=5;
    }
    $var = '';
    echo 'Memory limit: '.ini_get('memory_limit').'<br>';
    for ($i=0; $i<=$mb; $i++) {
    $var.= str_repeat('a',1*1024*1024);
    echo memory_get_usage().'<br>';
    }
    echo 'String length: '. strlen($var);
    ?>

    Expected result:
    ----------------
    PHP should, if it did run out of memory, exit with something along the
    lines of

    Fatal error: Allowed memory size of xxx bytes exhausted (tried to
    allocate yyy bytes)

    otherwise, the script should execute without crashing.

    Actual result:
    --------------
    Apache child exits, browser waiting for the result of the page get a
    TCP connection reset and no page loaded.


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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
    edink@php.net Guest

  6. #5

    Default #40770 [Ver->Asn]: Apache child exits when PHP memory limit reached

    ID: 40770
    Updated by: [email]edink@php.net[/email]
    Reported By: php at edwardk dot info
    -Status: Verified
    +Status: Assigned
    Bug Type: Reproducible crash
    Operating System: Windows 2003
    PHP Version: 5.2.1
    -Assigned To:
    +Assigned To: dmitry
    New Comment:

    Also happens in the latest 5.2 with both win32 and malloc
    ZEND_MM_MEM_TYPE.

    USE_ZEND_ALLOC=0 makes the problem disappear, but then no memory limit
    is enforced.



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

    [2007-03-12 03:27:43] [email]edink@php.net[/email]

    I can reproduce the problem. When running this example in CLI PHP
    aborts with:

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
    allocate 133169153 bytes) in C:\php4build\PHP_5_2\Release_TS\t.php on
    line 12
    zend_mm_heap corrupted


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

    [2007-03-11 21:35:14] php at edwardk dot info

    I don't believe so. It should be the official PHP 5.2.1 windows binary
    release.

    phpinfo() reports:


    PHP Version 5.2.1
    Build Date Feb 7 2007 23:10:31
    Configure Command cscript /nologo configure.js
    "--enable-snapshot-build" "--with-gd=shared"

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

    [2007-03-11 14:52:57] [email]iliaa@php.net[/email]

    Are you running debug build of PHP by any chance?

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

    [2007-03-10 03:24:58] php at edwardk dot info

    Description:
    ------------
    Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit

    The following PHP code was called from a browser with the size=149 (to
    simulate 149MB use) and the PHP memory limit is 160M.


    Reproduce code:
    ---------------
    <?
    ini_set('display_errors',true);
    if (isset($_GET['size']) && $_GET['size'] < 200) {
    $mb = intval($_GET['size']);
    }
    else {
    $mb=5;
    }
    $var = '';
    echo 'Memory limit: '.ini_get('memory_limit').'<br>';
    for ($i=0; $i<=$mb; $i++) {
    $var.= str_repeat('a',1*1024*1024);
    echo memory_get_usage().'<br>';
    }
    echo 'String length: '. strlen($var);
    ?>

    Expected result:
    ----------------
    PHP should, if it did run out of memory, exit with something along the
    lines of

    Fatal error: Allowed memory size of xxx bytes exhausted (tried to
    allocate yyy bytes)

    otherwise, the script should execute without crashing.

    Actual result:
    --------------
    Apache child exits, browser waiting for the result of the page get a
    TCP connection reset and no page loaded.


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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
    edink@php.net Guest

  7. #6

    Default #40770 [Asn->Csd]: Apache child exits when PHP memory limit reached

    ID: 40770
    Updated by: [email]dmitry@php.net[/email]
    Reported By: php at edwardk dot info
    -Status: Assigned
    +Status: Closed
    Bug Type: Reproducible crash
    Operating System: Windows 2003
    PHP Version: 5.2.1
    Assigned To: dmitry
    New Comment:

    Fixed in CVS HEAD and PHP_5_2


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

    [2007-03-12 03:36:29] [email]edink@php.net[/email]

    Also happens in the latest 5.2 with both win32 and malloc
    ZEND_MM_MEM_TYPE.

    USE_ZEND_ALLOC=0 makes the problem disappear, but then no memory limit
    is enforced.


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

    [2007-03-12 03:27:43] [email]edink@php.net[/email]

    I can reproduce the problem. When running this example in CLI PHP
    aborts with:

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
    allocate 133169153 bytes) in C:\php4build\PHP_5_2\Release_TS\t.php on
    line 12
    zend_mm_heap corrupted


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

    [2007-03-11 21:35:14] php at edwardk dot info

    I don't believe so. It should be the official PHP 5.2.1 windows binary
    release.

    phpinfo() reports:


    PHP Version 5.2.1
    Build Date Feb 7 2007 23:10:31
    Configure Command cscript /nologo configure.js
    "--enable-snapshot-build" "--with-gd=shared"

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

    [2007-03-11 14:52:57] [email]iliaa@php.net[/email]

    Are you running debug build of PHP by any chance?

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

    [2007-03-10 03:24:58] php at edwardk dot info

    Description:
    ------------
    Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit

    The following PHP code was called from a browser with the size=149 (to
    simulate 149MB use) and the PHP memory limit is 160M.


    Reproduce code:
    ---------------
    <?
    ini_set('display_errors',true);
    if (isset($_GET['size']) && $_GET['size'] < 200) {
    $mb = intval($_GET['size']);
    }
    else {
    $mb=5;
    }
    $var = '';
    echo 'Memory limit: '.ini_get('memory_limit').'<br>';
    for ($i=0; $i<=$mb; $i++) {
    $var.= str_repeat('a',1*1024*1024);
    echo memory_get_usage().'<br>';
    }
    echo 'String length: '. strlen($var);
    ?>

    Expected result:
    ----------------
    PHP should, if it did run out of memory, exit with something along the
    lines of

    Fatal error: Allowed memory size of xxx bytes exhausted (tried to
    allocate yyy bytes)

    otherwise, the script should execute without crashing.

    Actual result:
    --------------
    Apache child exits, browser waiting for the result of the page get a
    TCP connection reset and no page loaded.


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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
    dmitry@php.net Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139