WsServer reaches ulimit
Hi,

We have a websocket test server running and we notice this error message appearing after the server has served a number of connections approximately equal to two times the user/process ulimit:

PHP Warning:  stream_socket_accept(): accept failed: Too many open files in /var/Websocket/vendor/react/socket/React/Socket/Server.php on line 31

When the message appears there are many concurrent connections, but never as much as the ulimit. This has been verified via code, via /proc/sys/fs/file-nr and by examining the output of lsof and netstat.

ex.
concurrent users: 8362
total n. of connections served: 117240
ulimit 65535
/proc/sys/fs/file-nr 
66211   0   165451

We are running Ubuntu 12.04.2, PHP 5.3.10.

We'll be happy to provide more details if necessary.
