From: chris dot noden at monstermob dot com
Operating system: Redhat AS 2.1
PHP version: 4.3.4
PHP Bug Type: Performance problem
Bug description: CLI Script Memory Leak
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.
--
Edit bug report at http://bugs.php.net/?id=27360&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27360&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27360&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27360&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27360&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27360&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27360&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27360&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27360&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27360&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27360&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27360&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27360&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27360&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27360&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27360&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27360&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27360&r=float