I have a PHP socket running on port 15151
hosted on EC2 Ubuntu.
I have a php project that push a message to this socket, and this message is received by clients connected to the socket are using a VB6 application.
When more than 1024 clients connect to the socket, the socket is crashing and a php error is returned
stream_select(): You MUST recompile PHP with a larger value of FD_SETSIZE. It is set to 1024, but you have descriptors numbered at least as high as 1123. --enable-fd-setsize=2048 is recommended
What I tried to do is to create a new ec2 instance, same code, socket server, same port and i have added a load balancer.
The problem is now that if a client (foo) vb6 is connected to instance 1, how the php project that send the message to this client will know that foo is connected to 1 and not to instance 2
How should I manage this