Hey!
I'm working on a multiuser application, i'm using socket connection betwen clients and server which is a simple PHP socket server, i've put all the functionality into the client part to free the server, so all the server does is just recive the data from clents and send it to all clents without processing it in any way.
The idea was to have 30 connections at a time and it was working fine when i launched those 30 connections from 3 computers at my office, but when acctual users connect to server following happens:
after some users connect and start using this application (sending XML back and forward) Server seems to be unable to send any data, i'm sure that users connect to the server because client part shows "Conncted to [IP]", and then after some time it starts to work again and works fine for some time again. This bug doesn't seem to be happening with some specific ammount of connected users,it may happen with 9 users and then work fine with 20.
I use linux for platform and PHP 4.2.2.
I'm thinking of two possible reasons:
- Some broken connection blocks writing to other connections.
- Some linux socket settings prevent from sending alots of data to clients over sockets.
Attached is source code of my PHP socket server.
Any help or suggestions would be great.