ID: 29560 Updated by: [EMAIL PROTECTED] Reported By: info at tphnet dot com -Status: No Feedback +Status: Closed Bug Type: Sockets related Operating System: Windows XP SP1 PHP Version: 5.0.0 New Comment:
Considered fixed in 5.1 Previous Comments: ------------------------------------------------------------------------ [2004-09-27 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2004-09-18 18:19:57] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2004-09-18 01:49:34] master_tip at hotmail dot com hi i'm docey, i'm also writing a cli app that used a multi-client socket functions. at first i was using the deprecated socket functions and indeed found a memory leak. so i started re-writing my socket functions to use the almost similair stream functions. my aim was a simple interface in the some how complicated socket programming stuff. but i think i found a new part on this memory leak. the script is running cli on windows2000sp4 with php5.01(latest) and all works fine i can even have a short chat with myself using two telnet windows and then it happens. when i close the first telnet window php start eating memory rapidly and within a minute it grows from 6mb to 11mb but when i close the second telnet window it stops eating memory. the script is running quite a lot of loops per minute about 30000 i guese so there be a lot of socket_accepts and stream_switch when there is nothing else to do. the script is programmed to select a random function from a predefined list if there is no other function to be run. so a lot of checks are done. could it be something in the way telnet closed a connection. i'm using the standard telnet client in the windows2000 prompt. or is there a problem with stream_switch. i have checked if the script is not storing variables as an idiot in the arrays because that would eat a lot of memory too. also i haven't checked it with more then 2 clients running. and now i'm thinking when a client rapidly departs and php could not unset the socket form the list yet, and stream_switch would run over the sockets gathering new info. maybe stream_switch would be causing this because it sees an dead connection and can't handle with it. anyway, this is my story to the socket memory leak. if any of you have any ideas whats causing these leaks. i'm not the only one who's pleased to hear it(i hope, my c++ is not that good anymore). docey, the netherlands. ps. sorry for my broken english. ------------------------------------------------------------------------ [2004-08-09 02:04:14] info at tphnet dot com Tested using: PHP 5.1.0-dev (cli) (built: Aug 8 2004 16:31:06) The memory leak is still there, as described in my previous reply. ------------------------------------------------------------------------ [2004-08-08 01:47:37] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Try a snapshot, as a couple of peername related bugs were fixed recently. ------------------------------------------------------------------------ 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 http://bugs.php.net/29560 -- Edit this bug report at http://bugs.php.net/?id=29560&edit=1