codeigniter-websocket icon indicating copy to clipboard operation
codeigniter-websocket copied to clipboard

I'm not sure why I can only 255 connections be established by Websocket Server

Open ww610 opened this issue 3 years ago • 1 comments

I connected vuejs and c++ fronted using websocket server. But server connected only 255.

ww610 avatar Mar 22 '21 03:03 ww610

On Unix systems, every user that connects to your WebSocket server is represented as a file somewhere on the system. As a security measurement of every Unix-based OS, the number of "file descriptors" an application may have open at a time is limited - most of the time to a default value of 1024 - which would result in a maximum number of 1024 concurrent users on your WebSocket server.

In addition to the OS restrictions, this package makes use of an event loop called "stream_select", which has a hard limit of 1024. Increasing the maximum number of file descriptors#

The operating system limit of open "file descriptors" can be increased using the ulimit command. The -n option modifies the number of open file descriptors.

ulimit -n 10000

I think this should Help.

Source Open Connection Limit

takielias avatar Mar 25 '21 02:03 takielias