Professional Web Applications Themes

#39438 [NEW]: Memory leak PHP Fatal error: Out of memory - PHP Bugs

From: nikolas dot hagelstein at gmail dot com Operating system: NETBSD 3.0.1 AMD64 PHP version: 5.2.0 PHP Bug Type: Unknown/Other Function Bug description: Memory leak PHP Fatal error: Out of memory Description: ------------ After upgrading to php 5.2.0 im constantly receiving "PHP Fatal error: Out of memory error" where i did not received one using 5.1.6. I adjusted the memory limit from 64M to 256M but without any success. PHP Fatal error: Out of memory (allocated 250871808) at /usr/pkgsrc/www/ap-php/work/php-5.2.0/ext/standard/var.c:541 (tried to allocate 2215827 bytes) in /var/www/shared/typo3_src-4.0.1/typo3/mod/tools/em/class.em_xmlhandler.php on line 141, referer: [url]http://www.chaosbutze.de/typo3/mod/tools/em/index.php?[/url] i am not sure about how to dig into ...

  1. #1

    Default #39438 [NEW]: Memory leak PHP Fatal error: Out of memory

    From: nikolas dot hagelstein at gmail dot com
    Operating system: NETBSD 3.0.1 AMD64
    PHP version: 5.2.0
    PHP Bug Type: Unknown/Other Function
    Bug description: Memory leak PHP Fatal error: Out of memory

    Description:
    ------------
    After upgrading to php 5.2.0 im constantly receiving "PHP Fatal error:
    Out of memory error" where i did not received one using 5.1.6. I adjusted
    the memory limit from 64M to 256M but without any success.

    PHP Fatal error: Out of memory (allocated 250871808) at
    /usr/pkgsrc/www/ap-php/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 2215827 bytes) in
    /var/www/shared/typo3_src-4.0.1/typo3/mod/tools/em/class.em_xmlhandler.php
    on line 141, referer:
    [url]http://www.chaosbutze.de/typo3/mod/tools/em/index.php?[/url]

    i am not sure about how to dig into this but i can say that it seems to
    be somehow xml/serialize related.


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

  2. #2

    Default #39438 [Opn->Fbk]: Memory leak PHP Fatal error: Out of memory

    ID: 39438
    Updated by: [email]tony2001php.net[/email]
    Reported By: nikolas dot hagelstein at gmail dot com
    -Status: Open
    +Status: Feedback
    Bug Type: Unknown/Other Function
    Operating System: NETBSD 3.0.1 AMD64
    PHP Version: 5.2.0
    New Comment:

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.




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

    [2006-11-08 20:33:53] nikolas dot hagelstein at gmail dot com

    Description:
    ------------
    After upgrading to php 5.2.0 im constantly receiving "PHP Fatal error:
    Out of memory error" where i did not received one using 5.1.6. I
    adjusted the memory limit from 64M to 256M but without any success.

    PHP Fatal error: Out of memory (allocated 250871808) at
    /usr/pkgsrc/www/ap-php/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 2215827 bytes) in
    /var/www/shared/typo3_src-4.0.1/typo3/mod/tools/em/class.em_xmlhandler.php
    on line 141, referer:
    [url]http://www.chaosbutze.de/typo3/mod/tools/em/index.php?[/url]

    i am not sure about how to dig into this but i can say that it seems
    to be somehow xml/serialize related.



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


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

  3. #3

    Default #39438 [Fbk->Opn]: Memory leak PHP Fatal error: Out of memory

    ID: 39438
    User updated by: nikolas dot hagelstein at gmail dot com
    Reported By: nikolas dot hagelstein at gmail dot com
    -Status: Feedback
    +Status: Open
    Bug Type: Unknown/Other Function
    Operating System: NETBSD 3.0.1 AMD64
    PHP Version: 5.2.0
    New Comment:

    <?php
    $i=0;
    $test2=array(
    'a1_teasermenu' => array(
    'downloadcounter' => 2777,
    'versions' => array(
    '0.1.0' => array (
    'title' => 'A1 Teasermenu',
    'description' => 'Displays a teaser for advanced subpages
    or a selection of advanced pages',
    'state' => 'stable',
    'reviewstate' => 0,
    'category' => 'plugin',
    'downloadcounter' => 2787,
    'lastuploaddate' => 1088427240,
    'dependencies' => array (
    'depends' => array(
    'typo3' =>'',
    'php' =>'',
    'cms' => ''
    ),
    'conflicts' => array('' =>'')
    ),
    'authorname' => 'Mirko Balluff',
    'authoremail' => 'balluffamt1.de',
    'ownerusername' => 'amt1',
    't3xfilemd5' => '3a4ec198b6ea8d0bc2d69d9b7400398f',
    )
    )
    )
    );
    $test=array();
    while($i<1600) {
    $test[]=$test2;
    $i++;
    }
    $out=gzcompress(serialize($test));
    ?>

    results in :
    PHP Fatal error: Allowed memory size of 67108864 bytes exhausted at
    /usr/pkgsrc/lang/php5/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 1041720 bytes) in /var/www/www.chaosbutze.de/htdocs/test2.php
    on line 37

    while it works on php 5.1.6 and 4.
    Having mem limit set to 64MB.

    Setting mem limit to 128MB and increasing interations to 2260 also
    causes the above mentioned error.


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

    [2006-11-08 20:46:33] [email]tony2001php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



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

    [2006-11-08 20:33:53] nikolas dot hagelstein at gmail dot com

    Description:
    ------------
    After upgrading to php 5.2.0 im constantly receiving "PHP Fatal error:
    Out of memory error" where i did not received one using 5.1.6. I
    adjusted the memory limit from 64M to 256M but without any success.

    PHP Fatal error: Out of memory (allocated 250871808) at
    /usr/pkgsrc/www/ap-php/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 2215827 bytes) in
    /var/www/shared/typo3_src-4.0.1/typo3/mod/tools/em/class.em_xmlhandler.php
    on line 141, referer:
    [url]http://www.chaosbutze.de/typo3/mod/tools/em/index.php?[/url]

    i am not sure about how to dig into this but i can say that it seems
    to be somehow xml/serialize related.



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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39438&edit=1[/url]
    nikolas dot hagelstein at gmail dot com Guest

  4. #4

    Default #39438 [Opn]: Memory leak PHP Fatal error: Out of memory

    ID: 39438
    User updated by: nikolas dot hagelstein at gmail dot com
    Reported By: nikolas dot hagelstein at gmail dot com
    Status: Open
    Bug Type: Unknown/Other Function
    Operating System: NETBSD 3.0.1 AMD64
    PHP Version: 5.2.0
    New Comment:

    Did some further testing:
    the script worked on:
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:8mb
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:64MB


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

    [2006-11-08 21:40:32] nikolas dot hagelstein at gmail dot com

    <?php
    $i=0;
    $test2=array(
    'a1_teasermenu' => array(
    'downloadcounter' => 2777,
    'versions' => array(
    '0.1.0' => array (
    'title' => 'A1 Teasermenu',
    'description' => 'Displays a teaser for advanced subpages
    or a selection of advanced pages',
    'state' => 'stable',
    'reviewstate' => 0,
    'category' => 'plugin',
    'downloadcounter' => 2787,
    'lastuploaddate' => 1088427240,
    'dependencies' => array (
    'depends' => array(
    'typo3' =>'',
    'php' =>'',
    'cms' => ''
    ),
    'conflicts' => array('' =>'')
    ),
    'authorname' => 'Mirko Balluff',
    'authoremail' => 'balluffamt1.de',
    'ownerusername' => 'amt1',
    't3xfilemd5' => '3a4ec198b6ea8d0bc2d69d9b7400398f',
    )
    )
    )
    );
    $test=array();
    while($i<1600) {
    $test[]=$test2;
    $i++;
    }
    $out=gzcompress(serialize($test));
    ?>

    results in :
    PHP Fatal error: Allowed memory size of 67108864 bytes exhausted at
    /usr/pkgsrc/lang/php5/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 1041720 bytes) in /var/www/www.chaosbutze.de/htdocs/test2.php
    on line 37

    while it works on php 5.1.6 and 4.
    Having mem limit set to 64MB.

    Setting mem limit to 128MB and increasing interations to 2260 also
    causes the above mentioned error.

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

    [2006-11-08 20:46:33] [email]tony2001php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



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

    [2006-11-08 20:33:53] nikolas dot hagelstein at gmail dot com

    Description:
    ------------
    After upgrading to php 5.2.0 im constantly receiving "PHP Fatal error:
    Out of memory error" where i did not received one using 5.1.6. I
    adjusted the memory limit from 64M to 256M but without any success.

    PHP Fatal error: Out of memory (allocated 250871808) at
    /usr/pkgsrc/www/ap-php/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 2215827 bytes) in
    /var/www/shared/typo3_src-4.0.1/typo3/mod/tools/em/class.em_xmlhandler.php
    on line 141, referer:
    [url]http://www.chaosbutze.de/typo3/mod/tools/em/index.php?[/url]

    i am not sure about how to dig into this but i can say that it seems
    to be somehow xml/serialize related.



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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39438&edit=1[/url]
    nikolas dot hagelstein at gmail dot com Guest

  5. #5

    Default #39438 [Opn->Asn]: Memory leak PHP Fatal error: Out of memory

    ID: 39438
    Updated by: [email]dmitryphp.net[/email]
    Reported By: nikolas dot hagelstein at gmail dot com
    -Status: Open
    +Status: Assigned
    Bug Type: Unknown/Other Function
    Operating System: NETBSD 3.0.1 AMD64
    PHP Version: 5.2.0
    -Assigned To:
    +Assigned To: dmitry


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

    [2006-11-08 21:56:24] nikolas dot hagelstein at gmail dot com

    Did some further testing:
    the script worked on:
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:8mb
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:64MB

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

    [2006-11-08 21:40:32] nikolas dot hagelstein at gmail dot com

    <?php
    $i=0;
    $test2=array(
    'a1_teasermenu' => array(
    'downloadcounter' => 2777,
    'versions' => array(
    '0.1.0' => array (
    'title' => 'A1 Teasermenu',
    'description' => 'Displays a teaser for advanced subpages
    or a selection of advanced pages',
    'state' => 'stable',
    'reviewstate' => 0,
    'category' => 'plugin',
    'downloadcounter' => 2787,
    'lastuploaddate' => 1088427240,
    'dependencies' => array (
    'depends' => array(
    'typo3' =>'',
    'php' =>'',
    'cms' => ''
    ),
    'conflicts' => array('' =>'')
    ),
    'authorname' => 'Mirko Balluff',
    'authoremail' => 'balluffamt1.de',
    'ownerusername' => 'amt1',
    't3xfilemd5' => '3a4ec198b6ea8d0bc2d69d9b7400398f',
    )
    )
    )
    );
    $test=array();
    while($i<1600) {
    $test[]=$test2;
    $i++;
    }
    $out=gzcompress(serialize($test));
    ?>

    results in :
    PHP Fatal error: Allowed memory size of 67108864 bytes exhausted at
    /usr/pkgsrc/lang/php5/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 1041720 bytes) in /var/www/www.chaosbutze.de/htdocs/test2.php
    on line 37

    while it works on php 5.1.6 and 4.
    Having mem limit set to 64MB.

    Setting mem limit to 128MB and increasing interations to 2260 also
    causes the above mentioned error.

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

    [2006-11-08 20:46:33] [email]tony2001php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



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

    [2006-11-08 20:33:53] nikolas dot hagelstein at gmail dot com

    Description:
    ------------
    After upgrading to php 5.2.0 im constantly receiving "PHP Fatal error:
    Out of memory error" where i did not received one using 5.1.6. I
    adjusted the memory limit from 64M to 256M but without any success.

    PHP Fatal error: Out of memory (allocated 250871808) at
    /usr/pkgsrc/www/ap-php/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 2215827 bytes) in
    /var/www/shared/typo3_src-4.0.1/typo3/mod/tools/em/class.em_xmlhandler.php
    on line 141, referer:
    [url]http://www.chaosbutze.de/typo3/mod/tools/em/index.php?[/url]

    i am not sure about how to dig into this but i can say that it seems
    to be somehow xml/serialize related.



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


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

  6. #6

    Default #39438 [Com]: Memory leak PHP Fatal error: Out of memory

    ID: 39438
    Comment by: stig at 8620 dot dk
    Reported By: nikolas dot hagelstein at gmail dot com
    Status: Assigned
    Bug Type: Unknown/Other Function
    Operating System: NETBSD 3.0.1 AMD64
    PHP Version: 5.2.0
    Assigned To: dmitry
    New Comment:

    Are there current any work arounds for this problem?
    My host has upgraded to 5.2.0, so I'm stuck with this problem.


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

    [2006-11-08 21:56:24] nikolas dot hagelstein at gmail dot com

    Did some further testing:
    the script worked on:
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:8mb
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:64MB

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

    [2006-11-08 21:40:32] nikolas dot hagelstein at gmail dot com

    <?php
    $i=0;
    $test2=array(
    'a1_teasermenu' => array(
    'downloadcounter' => 2777,
    'versions' => array(
    '0.1.0' => array (
    'title' => 'A1 Teasermenu',
    'description' => 'Displays a teaser for advanced subpages
    or a selection of advanced pages',
    'state' => 'stable',
    'reviewstate' => 0,
    'category' => 'plugin',
    'downloadcounter' => 2787,
    'lastuploaddate' => 1088427240,
    'dependencies' => array (
    'depends' => array(
    'typo3' =>'',
    'php' =>'',
    'cms' => ''
    ),
    'conflicts' => array('' =>'')
    ),
    'authorname' => 'Mirko Balluff',
    'authoremail' => 'balluffamt1.de',
    'ownerusername' => 'amt1',
    't3xfilemd5' => '3a4ec198b6ea8d0bc2d69d9b7400398f',
    )
    )
    )
    );
    $test=array();
    while($i<1600) {
    $test[]=$test2;
    $i++;
    }
    $out=gzcompress(serialize($test));
    ?>

    results in :
    PHP Fatal error: Allowed memory size of 67108864 bytes exhausted at
    /usr/pkgsrc/lang/php5/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 1041720 bytes) in /var/www/www.chaosbutze.de/htdocs/test2.php
    on line 37

    while it works on php 5.1.6 and 4.
    Having mem limit set to 64MB.

    Setting mem limit to 128MB and increasing interations to 2260 also
    causes the above mentioned error.

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

    [2006-11-08 20:46:33] [email]tony2001php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



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

    [2006-11-08 20:33:53] nikolas dot hagelstein at gmail dot com

    Description:
    ------------
    After upgrading to php 5.2.0 im constantly receiving "PHP Fatal error:
    Out of memory error" where i did not received one using 5.1.6. I
    adjusted the memory limit from 64M to 256M but without any success.

    PHP Fatal error: Out of memory (allocated 250871808) at
    /usr/pkgsrc/www/ap-php/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 2215827 bytes) in
    /var/www/shared/typo3_src-4.0.1/typo3/mod/tools/em/class.em_xmlhandler.php
    on line 141, referer:
    [url]http://www.chaosbutze.de/typo3/mod/tools/em/index.php?[/url]

    i am not sure about how to dig into this but i can say that it seems
    to be somehow xml/serialize related.



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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39438&edit=1[/url]
    stig at 8620 dot dk Guest

  7. #7

    Default #39438 [Asn]: Memory leak PHP Fatal error: Out of memory

    ID: 39438
    User updated by: nikolas dot hagelstein at gmail dot com
    Reported By: nikolas dot hagelstein at gmail dot com
    Status: Assigned
    Bug Type: Unknown/Other Function
    Operating System: NETBSD 3.0.1 AMD64
    PHP Version: 5.2.0
    Assigned To: dmitry
    New Comment:

    No workarounds atm i had to downgrade :|


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

    [2006-11-27 10:45:39] stig at 8620 dot dk

    Are there current any work arounds for this problem?
    My host has upgraded to 5.2.0, so I'm stuck with this problem.

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

    [2006-11-08 21:56:24] nikolas dot hagelstein at gmail dot com

    Did some further testing:
    the script worked on:
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:8mb
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:64MB

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

    [2006-11-08 21:40:32] nikolas dot hagelstein at gmail dot com

    <?php
    $i=0;
    $test2=array(
    'a1_teasermenu' => array(
    'downloadcounter' => 2777,
    'versions' => array(
    '0.1.0' => array (
    'title' => 'A1 Teasermenu',
    'description' => 'Displays a teaser for advanced subpages
    or a selection of advanced pages',
    'state' => 'stable',
    'reviewstate' => 0,
    'category' => 'plugin',
    'downloadcounter' => 2787,
    'lastuploaddate' => 1088427240,
    'dependencies' => array (
    'depends' => array(
    'typo3' =>'',
    'php' =>'',
    'cms' => ''
    ),
    'conflicts' => array('' =>'')
    ),
    'authorname' => 'Mirko Balluff',
    'authoremail' => 'balluffamt1.de',
    'ownerusername' => 'amt1',
    't3xfilemd5' => '3a4ec198b6ea8d0bc2d69d9b7400398f',
    )
    )
    )
    );
    $test=array();
    while($i<1600) {
    $test[]=$test2;
    $i++;
    }
    $out=gzcompress(serialize($test));
    ?>

    results in :
    PHP Fatal error: Allowed memory size of 67108864 bytes exhausted at
    /usr/pkgsrc/lang/php5/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 1041720 bytes) in /var/www/www.chaosbutze.de/htdocs/test2.php
    on line 37

    while it works on php 5.1.6 and 4.
    Having mem limit set to 64MB.

    Setting mem limit to 128MB and increasing interations to 2260 also
    causes the above mentioned error.

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

    [2006-11-08 20:46:33] [email]tony2001php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



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

    [2006-11-08 20:33:53] nikolas dot hagelstein at gmail dot com

    Description:
    ------------
    After upgrading to php 5.2.0 im constantly receiving "PHP Fatal error:
    Out of memory error" where i did not received one using 5.1.6. I
    adjusted the memory limit from 64M to 256M but without any success.

    PHP Fatal error: Out of memory (allocated 250871808) at
    /usr/pkgsrc/www/ap-php/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 2215827 bytes) in
    /var/www/shared/typo3_src-4.0.1/typo3/mod/tools/em/class.em_xmlhandler.php
    on line 141, referer:
    [url]http://www.chaosbutze.de/typo3/mod/tools/em/index.php?[/url]

    i am not sure about how to dig into this but i can say that it seems
    to be somehow xml/serialize related.



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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39438&edit=1[/url]
    nikolas dot hagelstein at gmail dot com Guest

  8. #8

    Default #39438 [Com]: Memory leak PHP Fatal error: Out of memory

    ID: 39438
    Comment by: lmiranda at lumigo dot net
    Reported By: nikolas dot hagelstein at gmail dot com
    Status: Assigned
    Bug Type: Unknown/Other Function
    Operating System: NETBSD 3.0.1 AMD64
    PHP Version: 5.2.0
    Assigned To: dmitry
    New Comment:

    I had this problem with my forum, after some time it showed:

    Fatal error: Out of memory (allocated 786432) (tried to allocate
    1572864 bytes)

    I tried to set memory_limit from 16M to 64M, and it didn't work.

    I've downgraded to 5.1.6


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

    [2006-11-27 12:40:24] nikolas dot hagelstein at gmail dot com

    No workarounds atm i had to downgrade :|

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

    [2006-11-27 10:45:39] stig at 8620 dot dk

    Are there current any work arounds for this problem?
    My host has upgraded to 5.2.0, so I'm stuck with this problem.

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

    [2006-11-08 21:56:24] nikolas dot hagelstein at gmail dot com

    Did some further testing:
    the script worked on:
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:8mb
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:64MB

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

    [2006-11-08 21:40:32] nikolas dot hagelstein at gmail dot com

    <?php
    $i=0;
    $test2=array(
    'a1_teasermenu' => array(
    'downloadcounter' => 2777,
    'versions' => array(
    '0.1.0' => array (
    'title' => 'A1 Teasermenu',
    'description' => 'Displays a teaser for advanced subpages
    or a selection of advanced pages',
    'state' => 'stable',
    'reviewstate' => 0,
    'category' => 'plugin',
    'downloadcounter' => 2787,
    'lastuploaddate' => 1088427240,
    'dependencies' => array (
    'depends' => array(
    'typo3' =>'',
    'php' =>'',
    'cms' => ''
    ),
    'conflicts' => array('' =>'')
    ),
    'authorname' => 'Mirko Balluff',
    'authoremail' => 'balluffamt1.de',
    'ownerusername' => 'amt1',
    't3xfilemd5' => '3a4ec198b6ea8d0bc2d69d9b7400398f',
    )
    )
    )
    );
    $test=array();
    while($i<1600) {
    $test[]=$test2;
    $i++;
    }
    $out=gzcompress(serialize($test));
    ?>

    results in :
    PHP Fatal error: Allowed memory size of 67108864 bytes exhausted at
    /usr/pkgsrc/lang/php5/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 1041720 bytes) in /var/www/www.chaosbutze.de/htdocs/test2.php
    on line 37

    while it works on php 5.1.6 and 4.
    Having mem limit set to 64MB.

    Setting mem limit to 128MB and increasing interations to 2260 also
    causes the above mentioned error.

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

    [2006-11-08 20:46:33] [email]tony2001php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/39438[/url]

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

  9. #9

    Default #39438 [Com]: Memory leak PHP Fatal error: Out of memory

    ID: 39438
    Comment by: phpbugs at thequod dot de
    Reported By: nikolas dot hagelstein at gmail dot com
    Status: Assigned
    Bug Type: Unknown/Other Function
    Operating System: NETBSD 3.0.1 AMD64
    PHP Version: 5.2.0
    Assigned To: dmitry
    New Comment:

    Just for info: I've experienced memory usage bumping since
    somewhere after 5.2.0RC2 and current CVS.
    (phpDoentor needs more than 256M with 5.2.1-dev, but
    not with 5.2.0RC3-dev)


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

    [2006-11-27 19:28:08] lmiranda at lumigo dot net

    I had this problem with my forum, after some time it showed:

    Fatal error: Out of memory (allocated 786432) (tried to allocate
    1572864 bytes)

    I tried to set memory_limit from 16M to 64M, and it didn't work.

    I've downgraded to 5.1.6

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

    [2006-11-27 12:40:24] nikolas dot hagelstein at gmail dot com

    No workarounds atm i had to downgrade :|

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

    [2006-11-27 10:45:39] stig at 8620 dot dk

    Are there current any work arounds for this problem?
    My host has upgraded to 5.2.0, so I'm stuck with this problem.

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

    [2006-11-08 21:56:24] nikolas dot hagelstein at gmail dot com

    Did some further testing:
    the script worked on:
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:8mb
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:64MB

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

    [2006-11-08 21:40:32] nikolas dot hagelstein at gmail dot com

    <?php
    $i=0;
    $test2=array(
    'a1_teasermenu' => array(
    'downloadcounter' => 2777,
    'versions' => array(
    '0.1.0' => array (
    'title' => 'A1 Teasermenu',
    'description' => 'Displays a teaser for advanced subpages
    or a selection of advanced pages',
    'state' => 'stable',
    'reviewstate' => 0,
    'category' => 'plugin',
    'downloadcounter' => 2787,
    'lastuploaddate' => 1088427240,
    'dependencies' => array (
    'depends' => array(
    'typo3' =>'',
    'php' =>'',
    'cms' => ''
    ),
    'conflicts' => array('' =>'')
    ),
    'authorname' => 'Mirko Balluff',
    'authoremail' => 'balluffamt1.de',
    'ownerusername' => 'amt1',
    't3xfilemd5' => '3a4ec198b6ea8d0bc2d69d9b7400398f',
    )
    )
    )
    );
    $test=array();
    while($i<1600) {
    $test[]=$test2;
    $i++;
    }
    $out=gzcompress(serialize($test));
    ?>

    results in :
    PHP Fatal error: Allowed memory size of 67108864 bytes exhausted at
    /usr/pkgsrc/lang/php5/work/php-5.2.0/ext/standard/var.c:541 (tried to
    allocate 1041720 bytes) in /var/www/www.chaosbutze.de/htdocs/test2.php
    on line 37

    while it works on php 5.1.6 and 4.
    Having mem limit set to 64MB.

    Setting mem limit to 128MB and increasing interations to 2260 also
    causes the above mentioned error.

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/39438[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=39438&edit=1[/url]
    phpbugs at thequod dot de Guest

  10. #10

    Default #39438 [Com]: Memory leak PHP Fatal error: Out of memory

    ID: 39438
    Comment by: samuel at dragonboricua dot net
    Reported By: nikolas dot hagelstein at gmail dot com
    Status: Assigned
    Bug Type: Unknown/Other Function
    Operating System: NETBSD 3.0.1 AMD64
    PHP Version: 5.2.0
    Assigned To: dmitry
    New Comment:

    I started receiving this error on my WordPress blog since I upgraded to
    php 5.2.0 from 5.1.6, but seems that after a refresh it goes away
    (running on FastCGI on Apache). Sometimes it requires a few refreshes
    for it to go away, but it is never too constant.


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

    [2006-11-27 20:11:36] phpbugs at thequod dot de

    Just for info: I've experienced memory usage bumping since
    somewhere after 5.2.0RC2 and current CVS.
    (phpDoentor needs more than 256M with 5.2.1-dev, but
    not with 5.2.0RC3-dev)

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

    [2006-11-27 19:28:08] lmiranda at lumigo dot net

    I had this problem with my forum, after some time it showed:

    Fatal error: Out of memory (allocated 786432) (tried to allocate
    1572864 bytes)

    I tried to set memory_limit from 16M to 64M, and it didn't work.

    I've downgraded to 5.1.6

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

    [2006-11-27 12:40:24] nikolas dot hagelstein at gmail dot com

    No workarounds atm i had to downgrade :|

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

    [2006-11-27 10:45:39] stig at 8620 dot dk

    Are there current any work arounds for this problem?
    My host has upgraded to 5.2.0, so I'm stuck with this problem.

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

    [2006-11-08 21:56:24] nikolas dot hagelstein at gmail dot com

    Did some further testing:
    the script worked on:
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:8mb
    PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:64MB

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/39438[/url]

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

  11. #11

    Default #39438 [Com]: Memory leak PHP Fatal error: Out of memory

    ID: 39438
    Comment by: phpbugs at thequod dot de
    Reported By: nikolas dot hagelstein at gmail dot com
    Status: Assigned
    Bug Type: Unknown/Other Function
    Operating System: NETBSD 3.0.1 AMD64
    PHP Version: 5.2.0
    Assigned To: dmitry
    New Comment:

    I withdraw my previous comment, the RC3-build was
    without "--enable-memory-limit". Sorry.

    I've found that
    ---------------------------------------
    <?php
    $i = 0;
    $a = array();
    while( $i++ < 100000 )
    {
    $a[] = 'a';
    }
    echo memory_get_usage();
    ?>
    ---------------------------------------
    uses a lot more memory. I cannot say, if this is because
    of the more accurate memory manager reporting.

    I'm surprised how much memory is needed for 100.000 "a"'s
    in an array..


    $ php -f test2.php
    9494860
    danielbase [stp:2] { ~/bugs/php/memoryusage }
    $ php5 -f test2.php
    6967216

    --------

    $ php -v
    PHP 5.2.1-dev (cli) (built: Nov 27 2006 03:16:44)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend
    Technologies

    $ php5 -v
    PHP 5.1.6 (cli) (built: Nov 2 2006 12:49:10)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend
    Technologies


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

    [2006-11-29 15:35:50] samuel at dragonboricua dot net

    I started receiving this error on my WordPress blog since I upgraded to
    php 5.2.0 from 5.1.6, but seems that after a refresh it goes away
    (running on FastCGI on Apache). Sometimes it requires a few refreshes
    for it to go away, but it is never too constant.

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

    [2006-11-27 20:11:36] phpbugs at thequod dot de

    Just for info: I've experienced memory usage bumping since
    somewhere after 5.2.0RC2 and current CVS.
    (phpDoentor needs more than 256M with 5.2.1-dev, but
    not with 5.2.0RC3-dev)

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

    [2006-11-27 19:28:08] lmiranda at lumigo dot net

    I had this problem with my forum, after some time it showed:

    Fatal error: Out of memory (allocated 786432) (tried to allocate
    1572864 bytes)

    I tried to set memory_limit from 16M to 64M, and it didn't work.

    I've downgraded to 5.1.6

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

    [2006-11-27 12:40:24] nikolas dot hagelstein at gmail dot com

    No workarounds atm i had to downgrade :|

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

    [2006-11-27 10:45:39] stig at 8620 dot dk

    Are there current any work arounds for this problem?
    My host has upgraded to 5.2.0, so I'm stuck with this problem.

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/39438[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=39438&edit=1[/url]
    phpbugs at thequod dot de Guest

  12. #12

    Default #39438 [Asn->Csd]: Memory leak PHP Fatal error: Out of memory

    ID: 39438
    Updated by: [email]dmitryphp.net[/email]
    Reported By: nikolas dot hagelstein at gmail dot com
    -Status: Assigned
    +Status: Closed
    Bug Type: Unknown/Other Function
    Operating System: NETBSD 3.0.1 AMD64
    PHP Version: 5.2.0
    Assigned To: dmitry
    New Comment:

    Fixed in CVS HEAD and PHP_5_2.


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

    [2006-11-29 19:55:49] phpbugs at thequod dot de

    I withdraw my previous comment, the RC3-build was
    without "--enable-memory-limit". Sorry.

    I've found that
    ---------------------------------------
    <?php
    $i = 0;
    $a = array();
    while( $i++ < 100000 )
    {
    $a[] = 'a';
    }
    echo memory_get_usage();
    ?>
    ---------------------------------------
    uses a lot more memory. I cannot say, if this is because
    of the more accurate memory manager reporting.

    I'm surprised how much memory is needed for 100.000 "a"'s
    in an array..


    $ php -f test2.php
    9494860
    danielbase [stp:2] { ~/bugs/php/memoryusage }
    $ php5 -f test2.php
    6967216

    --------

    $ php -v
    PHP 5.2.1-dev (cli) (built: Nov 27 2006 03:16:44)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend
    Technologies

    $ php5 -v
    PHP 5.1.6 (cli) (built: Nov 2 2006 12:49:10)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend
    Technologies

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

    [2006-11-29 15:35:50] samuel at dragonboricua dot net

    I started receiving this error on my WordPress blog since I upgraded to
    php 5.2.0 from 5.1.6, but seems that after a refresh it goes away
    (running on FastCGI on Apache). Sometimes it requires a few refreshes
    for it to go away, but it is never too constant.

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

    [2006-11-27 20:11:36] phpbugs at thequod dot de

    Just for info: I've experienced memory usage bumping since
    somewhere after 5.2.0RC2 and current CVS.
    (phpDoentor needs more than 256M with 5.2.1-dev, but
    not with 5.2.0RC3-dev)

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

    [2006-11-27 19:28:08] lmiranda at lumigo dot net

    I had this problem with my forum, after some time it showed:

    Fatal error: Out of memory (allocated 786432) (tried to allocate
    1572864 bytes)

    I tried to set memory_limit from 16M to 64M, and it didn't work.

    I've downgraded to 5.1.6

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

    [2006-11-27 12:40:24] nikolas dot hagelstein at gmail dot com

    No workarounds atm i had to downgrade :|

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/39438[/url]

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

Similar Threads

  1. Fatal Error-Completely out of memory
    By Orla webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 0
    Last Post: September 16th, 09:35 AM
  2. #25335 [Opn]: Memory Leak with error handler and exceptions
    By helly@php.net in forum PHP Development
    Replies: 1
    Last Post: September 14th, 07:33 PM
  3. Memory consumption of Ruby/mod_ruby combo on Apache [memory leak]
    By David Heinemeier Hansson in forum Ruby
    Replies: 4
    Last Post: September 10th, 01:58 AM
  4. #25335 [NEW]: Memory Leak with error handler and exceptions
    By cunha17 at uol dot com dot br in forum PHP Development
    Replies: 0
    Last Post: September 1st, 12:45 AM
  5. oninit: Fatal error in shared memory creation
    By alex.odesser in forum Informix
    Replies: 1
    Last Post: August 6th, 05:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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