Insufficient TCP sockets are available

Were getting this error…

05/09/2004 01:35:23 AM Error on Listen function: Insufficient TCP sockets are available. Consult your vendor’s TCP/IP documentation to increase the maximum number of sockets.

05/09/2004 01:35:23 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

It seems to only effect notes clients. Domino Web Access and SMTP to Domino still work during this time-out. Even ssh to the box still works. I’ve searched the forum and tried several file max increases and nproc increases but no luck.

I’m at a loss. Please help.

Subject: Insufficient TCP sockets are available

Which version of SuSE? There was an issue where even if you set /etc/security/limits.conf to increase file descriptors it would not work due to issues with PAM and services (like ssh, login, telnet). The way to tell is when you login and right before running Domino, type in the command “ulimit -a” and see what it says for nofiles - if it is still 1024 then that is your issue. One “workaround”, which is unsecure but quick to test, is to “su” to root, manually increase the limit with “ulimit -n 32768”, then “su - USER” back to the USER - if you now do a “ulimit -a” you should see the increased file limit. The problem with this approach is that under your shell, root is still running. SLES 8 SP3 had a fix for this to work with ssh. Luck!

Subject: RE: Insufficient TCP sockets are available

Here are some tweeks I made to the system.

#############################################################

Global changes made to /etc/rc.d/boot.local

#############################################################

echo “300000” >/proc/sys/fs/file-max

echo 8388608 > /proc/sys/net/core/wmem_max

echo 8388608 > /proc/sys/net/core/rmem_max

echo “4096 87380 4194304” > /proc/sys/net/ipv4/tcp_rmem

echo “4096 65536 4194304” > /proc/sys/net/ipv4/tcp_wmem

echo 30 >/proc/sys/net/ipv4/tcp_fin_timeout

echo 1800 >/proc/sys/net/ipv4/tcp_keepalive_time

echo 0 >/proc/sys/net/ipv4/tcp_window_scaling

echo 0 >/proc/sys/net/ipv4/tcp_sack

echo 0 >/proc/sys/net/ipv4/tcp_timestamps

#############################################################

Changes to /etc/sysconfig/sysctl

#############################################################

Decrease the time default value for tcp_fin_timeout connection

net.ipv4.tcp_fin_timeout = 30

Decrease the time default value for tcp_keepalive_time connection

net.ipv4.tcp_keepalive_time = 1800

Turn off the tcp_window_scaling

net.ipv4.tcp_window_scaling = 0

Turn off the tcp_sack

net.ipv4.tcp_sack = 0

Turn off the tcp_timestamps

net.ipv4.tcp_timestamps = 0

#############################################################

Changes to /etc/fstab

#############################################################

/dev/sdb2 /notesdata reiserfs defaults,notime 1 2

#############################################################

Changes to /notesdaata/codnotesdata/.profile ( the notes users profile script)

#############################################################

ulimit -n 90000

Ulimit -s 1024

export Notes_PRIVATE_DPOOLSIZE=10000000

Subject: RE: Insufficient TCP sockets are available

Adding the ulimit commands to .profile doesn’t seem to work for me, because bash complains that user lotus (who is running my Domino server) doesn’t have enough privileges to increase the limits.

Instead I modified the script that starts Domino so that the start) section looks like this:


start() {

    echo -n "Starting domino: "

    if [ -f $DOM_HOME/.jsc_lock ]; then

            rm $DOM_HOME/.jsc_lock

    fi

    ulimit -n 52428

    ulimit -u 8192

    su - $DOM_USER -c "ulimit -n > /tmp/maxfiles; ulimit -u > /tmp/maxproc; LD_PRELOAD=$DOM_HOME/lib/libpthread.so.0:$DOM_HOME/lib/librt.so.1;export LD_PRELOAD;$DOM_PROG/server" > /dev/null 2>&1 &

    return 0

}


This sets the limits and echoes them to files in /tmp so I can verify it works. This is something similar I used to do with Slackware.

Subject: RE: Insufficient TCP sockets are available

Strange enough to document that now it seems to only happen exactly the same time every morning…

cat /tmp/domino_log.txt | grep TCPIP

05/13/2004 01:06:52 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:07:33 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:08:08 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:08:57 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:09:17 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:09:37 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:09:57 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:10:17 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:10:39 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:10:59 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:11:46 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:12:06 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:12:47 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:16:03 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:16:23 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:16:52 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 01:20:17 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 03:06:22 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 03:06:54 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 03:07:52 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 03:08:28 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 03:09:16 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 03:09:40 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 05:16:27 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 05:16:47 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 05:17:07 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 05:18:49 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors

05/13/2004 05:20:37 AM Listener task for port TCPIP is suspending for 20 seconds due to listen errors