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
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
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
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