on ubu 9.04 with 1.24.2 my apache stalled after 5-15 min, here's what i did to make it better:
i belive in stream.php are a few typos - there were 's.sock' and 'w.sock' files created - changed all two lines to 's.sock'
$locSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'s.sock';
also in this line was a 'k' too much (it said locksockfile before) - but that's just for the error msg
ajaxError( "socket_bind( $locSockFile ) failed: ".socket_strerror(socket_last_error()) );
another idea was to change the retry, so it looks every 0.2 sec for the file
$max_socket_tries = 10;
while ( !file_exists($remSockFile) && $max_socket_tries-- ) //sometimes we are too fast for our own good, if it hasn't been setup yet give it a second.
usleep(200000);
guess that was from PHP4 or earlier when usleep wasn't there
everything looks like it's working now, quicker and smoother! i think that my P4-1.8-north is fast enough to check that often (11 IP cams BLC01)
another idea was the to set the ulimit for nofiles to 4096 globally:
i've set /etc/security/limits.conf to
* - nofile 4096
root - nofile 4096
www-data - nofile 4096
hope that helps someone ... long time that i've done scripts though ...
EDIT
that s.sock change broke the progress bars ... but the timeout works nicely
biggest impact gotta be the files limit, almost everything runs as root or www-data