ID: 29460 User updated by: kylewong at southa dot com Reported By: kylewong at southa dot com Status: Open Bug Type: Session related Operating System: linux kernel 2.6.1 PHP Version: 4.3.8 New Comment:
more informations: apache fresh start without any session data: http://www2.southa.com/~kylewong/top-1.gif about 30 minutes later, httpd size grow around 1.5M http://www2.southa.com/~kylewong/top-2.gif 1 hour later from beginning, httpd size reach 10M, total session data size around 16M, average session file size around 2kb, around 4k sessions online. http://www2.southa.com/~kylewong/top-3.gif stop and restart apache without delete session data, most httpd size reach 10M immediately after apache start. http://www2.southa.com/~kylewong/top-4.gif stop, delete all session data, and restart apache. http://www2.southa.com/~kylewong/top-5.gif Previous Comments: ------------------------------------------------------------------------ [2004-07-30 18:49:24] kylewong at southa dot com 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 this bug report at http://bugs.php.net/?id=29460&edit=1
