> Its stopped from listening when I start loop through clients and 
> send back data to each one of connected cient
> 
> I have a similar server that created with indy with the same code 
> logic and can run 1200 clients per port .

The ICS server has been tested with over 1,200 simultaneous clients in
a single thread, look back in the mailing list, search for ComGen which
uses the TMagIpLog component I mentioned. 

So the problem is your use of the ICS code, no error handling or
logging, so you have no idea why it is not responding. 

But you never mentioned whether your 40 clients were simultaneous or
sequential.  TWSocketServer is a single thread server.  If you run long
blocking SQL operations (more than 100ms) responding to clients, then
the server is unable to process other clients at that moment and
everything will slow down. But without any logging, you currently have
no idea what is blocking your server, or even how many clients are
connected.   

My ICS web server logs it's SQL activity, so I know it's not taking too
long:

07:55:01 EXEC post_codes_lst_part2 'GU84DN'
07:55:01 SQL proc took 31ms
07:55:01 SQL Search Post Codes: GU84DN - Records Returned 1

If SQL is slow, the solution is run your SQL operation is a client
thread, so the server can keep responding, look at the ICS web server
which uses a thread to compress files and calculate CRCs to avoid
blocking other clients.  

Angus

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to