# Ruby Sockets Vulnerable?

**URL:** <https://www.ruby-forum.com/t/ruby-sockets-vulnerable/72994>\
**Category:** Ruby\
**Created:** [October 20, 2006, 1:17pm UTC](https://www.ruby-forum.com/t/ruby-sockets-vulnerable/72994 "2006-10-20T13:17:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unni.tallman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/f04885/32.png) [@unni.tallman](https://www.ruby-forum.com/u/unni.tallman)\
**Post date:** [October 20, 2006, 1:17pm UTC](https://www.ruby-forum.com/t/ruby-sockets-vulnerable/72994/1 "2006-10-20T13:17:15Z")

</div>

I have a TCPServer listening on a port. I forked a 500 odd TCP Clients  
and tried to connect to this TCPServer. Around 300 clients got  
connected, others gave the error :

```
               Connection timed out - connect(2) (Errno::ETIMEDOUT)

```

I wasn’t able to connect anymore clients to that server. Does this mean  
that ruby TCPServer can serve only a limited number of clients?

---

<div class="post-metadata">

**Author:** ![unni.tallman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/f04885/32.png) [@unni.tallman](https://www.ruby-forum.com/u/unni.tallman)\
**Post date:** [October 20, 2006, 1:35pm UTC](https://www.ruby-forum.com/t/ruby-sockets-vulnerable/72994/2 "2006-10-20T13:35:25Z")

</div>

On 20.10.2006 13:12, unni.tallman wrote:

> I have a TCPServer listening on a port. I forked a 500 odd TCP Clients  
> and tried to connect to this TCPServer. Around 300 clients got  
> connected, others gave the error :
> 
> ```
> Connection timed out - connect(2) (Errno::ETIMEDOUT)
> 
> ```
> 
> I wasn’t able to connect anymore clients to that server. Does this mean  
> that ruby TCPServer can serve only a limited number of clients?

It is a limitation of the underlying network functionality not of Ruby.  
If you are on Windows non server version a very strict limitation is  
actually built into the OS.

Note that it is generally not a good idea to allow arbitrary numbers of  
clients to be served.

Regards

```
robert
```
