From: kylewong at southa dot com Operating system: linux kernel 2.6.1 PHP version: 4.3.8 PHP Bug Type: Session related Bug description: memory usage (leak?) on session
Description: ------------ apache 2.0.48, php 4.3.7, 4.3.8 session handler = file apache keepalive timeout = 1 apache maxclient = 192 apache mpm = prefork session timeout = 1500 session file storage: tmpfs problem: php doesn't free memory used by session. My website is a high traffic site, process around 1800k php pages per day. The server always has around 5000-10000 sessions (25 mminutes) online. Each session file take around 200 bytes to several Kb, total session data take around 20-30MB. I found that my average httpd process size grow slowly from average 8MB to 1x-2xMB (take around 1-2 hours), my server always has around 200 httpd running (keepalive timeout = 1), system resouce decrease while httpd take more and more memory. At fresh start without any session data stored, my system has around 400MB buffer and 800MB cache, httpd size average round 8MB. When httpd processes grow to around 15MB, the system has only around 300MB buffer and 300MB cache, of course, server performance drop a lot since my site is very disk intensive (load lots of informations from thousands of serialized objects) It seems that the httpd process doesn't release all used memory after finish processing a page. I found that if I delete all the session data files while apache running, httpd processes start free up memory and system buffer and cache start growing to normal (400MB, 800MB), but after some time, httpd start grow again and system resources used for buffer and cache start decrease. Also, I found that, when the average httpd process size are at says 20MB, even if I stop and restart apache, all httpd process size will startup at 20MB, and keep growing. That's mean, I can't free up memory used by httpd processes by kill and restart apache, I need to delete the session data files to free up resouces. Sorry about my bad english, wish that someone can help me in my situation, thanks a lot. -- Edit bug report at http://bugs.php.net/?id=29460&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29460&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29460&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29460&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29460&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29460&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29460&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29460&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29460&r=support Expected behavior: http://bugs.php.net/fix.php?id=29460&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29460&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29460&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29460&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29460&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29460&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29460&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29460&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29460&r=float
