Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am developing a small test client for websockets. I am using Ubuntu 11.04 . I have read http://stackoverflow.com/questions/410616/increasing-the-maximum-number-of-tcp-ip-connections-in-linux and I have done the following

sudo sysctl -w  net.ipv4.tcp_fin_timeout=10 
sysctl -w net.ipv4.ip_local_port_range="1024 65535" 

As I understand these are for inbound connections and not outbound.

When I type

ulimit -n
unlimited

My client and servers run on different boxes. Even with all the above I am not able to cross beyound 1000 connections from a box . If there is a different tip let me know

ANSWER I figured this by typing ulimit -a which shows all the kernel limits .

ulimit -n 
unlimited 

while

ulimit -a 

returns the value for nofile as 1024. I set the limits in the */etc/security/limits.conf*file in the format

 <user> soft nofile 8192 
 <user> hard nofile 65000 

and things worked for user

share|improve this question
    
What I/O discovery method are you using? Is it select, poll, epoll, thread per connection, process pool, or what? And what goes wrong when you try to go over 1,000 connections? –  David Schwartz Feb 18 '12 at 6:16
    
I am using node.js socket.io-client . This internally is using a thread most probably . There is no error . netstat on the client and the server shows there are 1019 connections in the ESTABLISHED state There are no error messages on the client or on the server –  Harihara Vinayakaram Feb 18 '12 at 7:12
    
Are you sure you're typing ulimit -n from the exact same context in which node.js is launched? –  David Schwartz Feb 18 '12 at 7:22
    
I figured this by typing ulimit -a which shows all the kernel limits . ulimit -n returns unlimited while ulimit -a returns the value for nofile as 1024. I set the limits in the /etc/security/limits.conf file in the format ** <user> soft nofile 8192 <user> hard nofile 65000 and things worked –  Harihara Vinayakaram Feb 18 '12 at 10:36

1 Answer 1

I figured this by typing ulimit -a which shows all the kernel limits . ulimit -n returns unlimited while ulimit -a returns the value for nofile as 1024. I set the limits in the /etc/security/limits.conf file in the format ** soft nofile 8192 hard nofile 65000 and things worked

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.