[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Limit of maximal open sockets on debian testing.

Michael Kurz

5/12/2005 2:32:00 PM

Hi,

I use my ruby application as server and it seems that it can only open about
1024 sockets (files) at once.
(linux debian testing)

How can I change this?


Regards
Michael


2 Answers

Tanaka Akira

5/12/2005 4:36:00 PM

0

In article <428368e9$1@e-post.inode.at>,
"Michael Kurz" <mkurz@move-multimedia.com> writes:

> I use my ruby application as server and it seems that it can only open about
> 1024 sockets (files) at once.
> (linux debian testing)
>
> How can I change this?

Use ulimit or a similar builtin in your shell.

# ulimit -n
1024
# ruby -e 'fs=[]; loop { fs<<open(".") } rescue p fs.length'
1017
# ulimit -n 10000
# ruby -e 'fs=[]; loop { fs<<open(".") } rescue p fs.length'
9993
# cat /etc/debian_version
3.1

Note that you need a root privilege to increase hard limits.
--
Tanaka Akira


Zed A. Shaw

5/13/2005 3:50:00 AM

0

You'll also run into a similar limit if you use select for multi-plexing
IO. Depending on the platform, this may be 256 (BSD?), but usually
1024.

I'm not aware of any standard ulimit modifiers for this as it is
generally a space setting on the fd sets used in select.

Zed

On Thu, 2005-05-12 at 23:35 +0900, Michael Kurz wrote:
> Hi,
>
> I use my ruby application as server and it seems that it can only open about
> 1024 sockets (files) at once.
> (linux debian testing)
>
> How can I change this?
>
>
> Regards
> Michael
>
>
>
>
>