[Spread-users] Unable to support more than 1000 sessions after increasing MAX_FD_EVENTS

Rodrick Brown rodrick.brown at gmail.com
Sun Aug 24 22:40:49 EDT 2008

On Sun, Aug 24, 2008 at 8:10 PM, Daniel F. Savarese <dfs at savarese.org> wrote:
> In message <bb075cdf0808241442u594c2eb6k236deb5283329e05 at mail.gmail.com>, "Rodr
> ick Brown" writes:
>>I've also tried using the value 55 in MAX_FD_EVENTS and this does seem
>>to work as expected after about 25 or so connections I'm no longer
>>able to create any more sessions. What is strange here is that the
>>error raised is connection refused instead of the Too many open files
>>error as show before.
> It sounds like you need to raise the hard/soft file descriptor limits
> for the java process that is connecting to the spread daemon.  You get
> two different error codes/messages because in one situation (connection
> refused) it is the spread daemon that cannot accept any further
> connections and in another situation (too many open files), the
> java client process has run out of available file descriptors after
> hitting the default limit of 1024.  At least that's the impression
> I get based on my understanding of what you have described.
> You're probably not running the java client process as root, so you've
> got the little problem of not being able to increase the hard limit as
> a regular user.  You should be able to do something analogous to the
> following, which uses runuser from GNU coreutils (replace with your
> preferred privilege (de)escalating commands):
> su -c 'ulimit -H -n 8192; /sbin/runuser -s /bin/bash - nobody -c "ulimit -S -n 8192; java ... > /dev/null 2>&1 &"'
> daniel
> o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o o-o-o-o-o-o-o-o-o-o-o-o-o-o
>                    Igfip                      o    s a v a r e s e
> The strategic alternative for online games(tm).o   software research
>            http://www.igfip.com/              o http://www.savarese.com/
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users

Daniel thanks for the input I also thought this might have a been the
case we're the Java process was not able to open more than the default
1024 FD's however I create a very basic Socket application that just
opens a bunch of connections new Socket(ip,port) to a local service
i.e. ssh daemon and I was able to open over 30,000 file descriptors
with no problem.

The user who runs the java code has has ulimit -n 60000 set in the
shell profile.

[ Rodrick R. Brown ]

More information about the Spread-users mailing list