codeigniter-websocket
codeigniter-websocket copied to clipboard
I'm not sure why I can only 255 connections be established by Websocket Server
I connected vuejs and c++ fronted using websocket server. But server connected only 255.
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