powered by Jive Software

To many open files

Here is a tidbit from my logs. what does to many open files mean with regards to the jive messenger

Thanks

Randy

at org.jivesoftware.messenger.net.SocketAcceptThread.run(SocketAcceptThread.java:1 14)

2005.03.14 11:20:52 org.jivesoftware.messenger.net.SocketAcceptThread.run(SocketAcceptThread.java:12 2) Trouble accepting connection

java.net.SocketException: Too many open files

at java.net.PlainSocketImpl.socketAccept(Native Method)

at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)

at java.net.ServerSocket.implAccept(ServerSocket.java:450)

at java.net.ServerSocket.accept(ServerSocket.java:421)

at org.jivesoftware.messenger.net.SocketAcceptThread.run(SocketAcceptThread.java:1 14)

2005.03.14 11:20:54 org.jivesoftware.messenger.net.SocketAcceptThread.run(SocketAcceptThread.java:12 2) Trouble accepting connection

java.net.SocketException: Too many open files

at java.net.PlainSocketImpl.socketAccept(Native Method)

at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)

at java.net.ServerSocket.implAccept(ServerSocket.java:450)

at java.net.ServerSocket.accept(ServerSocket.java:421)

Hey Randy,

How many connections are you establishing with the server? After a google-search I found these possible solutions:

  1. If its a *nix system you may have to increase the number of allowed open file descriptors. On Linux, you can use the ulimit command to raise the number of open files that user can have.

ulimit -n (number)

will do the trick. Type this to see what it’'s set at:

ulimit -a

  1. It sounds like you’'re running out of TCP/IP “ephemeral ports”. If so, then you need to configure your OS to increase its “Max ports” (“ephemeral ports”) range:

EXAMPLE: NT/Windows 2000/XP:


MaxUserPort registry entry

HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

<= CREATE THE REGISTRY KEY “MaxUserPort” AND SET IT TO 10000 (OR HIGHER)

Instead of editing the registry, you’'d use the “ndd” command on Solaris or HPUX.

Here’'s a reasonably good write-up:

http://members.cox.net/~ndav1/stratasphere/selecting_ports.doc

Let me which one (if any) was of some help.

Regards,

– Gato

So, just to be clear here - ulimit -n should probably go somewhere like the ‘‘messenger’’ start script in /opt/jive_messenger/bin (Linux box)? I have it there, and have dealt with this sort of thing before with Apache and OpenLDAP.

However, with OpenLDAP, we ran into a problem in that even though we’'d increased the # of available files for the Apache process, OpenLDAP (within a PHP thread) was doing a socket select(), using the FD_SETSIZE macro, which is fixed at 1024.

From the log snippets above, it appears that the problem is in the OS-level socket accept(). So, theoretically, increasing the # of available files per process will solve the issue. However, has anyone verified that there isn’'t a socket select() happening anywhere which could have the same problems with a limit of 1024 as I mentioned above.

We are just now tickling 800 concurrent online users in our JM installation, and I want to be prepared to address this issue before we climb past 1024 - has anyone out there got > 1024 concurrent online users at their installation on a Linux box? If so, I’'d appreciate any advice you might have. Thanks!