php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27360 CLI Script Memory Leak
Submitted: 2004-02-23 04:52 UTC Modified: 2004-02-23 13:08 UTC
From: chris dot noden at monstermob dot com Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 4.3.4 OS: Redhat AS 2.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: chris dot noden at monstermob dot com
New email:
PHP Version: OS:

 

 [2004-02-23 04:52 UTC] chris dot noden at monstermob dot com
Description:
------------
Output from ps -auwwx:
MobServ  22077  0.5  3.8 127676 39392 ?      S    Feb19  29:08 /usr/local/bin/php ./logging.php
MobServ  22082  0.0  0.2  5492 2396 ?        S    Feb19   0:00 /usr/local/bin/php ./reports.php
MobServ  22120  0.0  0.2  6164 2676 ?        S    Feb19   2:29 /usr/local/bin/php ./neit.php
MobServ  22124  0.4  3.3 45656 34260 ?       S    Feb19  25:09 /usr/local/bin/php /MS3/daemons/neitChild.php --gw=1 --thread=1 --ppid=22120
MobServ  22128  0.0  0.3  6804 3500 ?        S    Feb19   0:28 /usr/local/bin/php /MS3/daemons/neitChild.php --gw=3 --thread=1 --ppid=22120
MobServ  22132  0.6  2.4 66960 25136 ?       R    Feb19  34:33 /usr/local/bin/php /MS3/daemons/neitChild.php --gw=5 --thread=1 --ppid=22120
MobServ  22137  0.6  2.4 66904 25376 ?       D    Feb19  34:32 /usr/local/bin/php /MS3/daemons/neitChild.php --gw=5 --thread=2 --ppid=22120
MobServ  22141  0.5  2.5 66924 26324 ?       D    Feb19  34:20 /usr/local/bin/php /MS3/daemons/neitChild.php --gw=5 --thread=3 --ppid=22120
MobServ  22146  0.1  0.6 13948 6904 ?        S    Feb19   5:48 /usr/local/bin/php /MS3/daemons/neitChild.php --gw=6 --thread=1 --ppid=22120
MobServ  22151  0.1  1.1 28616 11648 ?       S    Feb19  10:48 /usr/local/bin/php /MS3/daemons/neitChild.php --gw=7 --thread=1 --ppid=22120
MobServ  22233  0.6  4.7 60288 48628 ?       S    Feb19  38:16 /usr/local/bin/php ./dagda.php
MobServ  22253  0.1  0.8 51732 9228 ?        S    Feb19   6:31 /usr/local/bin/php ./atc.php
MobServ  24612  0.0  0.8 14132 8812 ?        S    Feb19   2:45 /usr/local/bin/php ./eiru.php
MobServ  26412  1.6  2.5 262728 26464 ?      S    Feb19  93:30 /usr/local/bin/php ./boann.php
MobServ  26463  0.0  0.2  5400 2684 ?        S    Feb19   0:01 /usr/local/bin/php ./scheduler.php
MobServ  14339  0.9  2.9 122172 30504 ?      D    Feb20  40:35 /usr/local/bin/php ./aine.php
MobServ  12402  0.0  0.2  5928 2760 ?        S    Feb20   0:03 /usr/local/bin/php ./bulksms.php

You can see several PHP CLI scripts all consuming far more memory than the 8M limit set in php.ini.

How is this possible.  My PHP scripts do not contain any code to allow this.  They are daemons, with infinite loops, signal and error handling.  Over a period of 5 days or so they consume more and more memory until the server tilts.

Reproduce code:
---------------
Can't do this in 20 lines or less.

Expected result:
----------------
A maximum memory use of 8Meg - shouldn't even need this amount.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-23 13:08 UTC] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


And for me latest stable CVS snapshot works fine. (I run a bot with it, never run out of memory either)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 03:01:29 2024 UTC