Technical article 114966

UW7/Open UNIX 8/OSR6/, My application returns IP SOCKET ACCEPT failed [errno 63] when I try to open hundreds of sockets per second.

OpenServer 6.0.0UnixWare 7.1.2UnixWare 7.1.3UnixWare 7.1.4Open UNIX 8

Written · Last revised

Problem

My application returns IP SOCKET ACCEPT failed [errno 63] when I try to open hundreds of sockets per second.

Cause

From /usr/include/sys/errno.h, we can see that error 63 refers to:

#define ENOSR   63      /* out of streams resources             */

Solution

There are a number of steps we can take to try to alleviate the problem.

1. For a list of the latest patches visit:

http://www.sco.com/support/download.html

2. For OU8 only. for a list of additional packages, such as the "Modify System for Linux Applications" (MSLA) package, visit:

ftp://ftp2.sco.com/pub/skunkware/ou8/sysadmin/
3. You may wish to turn off network services not being used by the
   server from /etc/rc2.d.  For example, SENDMAIL. More
   information on this can be found from TA # 111865,
   "How do I tune my UnixWare 7 server to run Tarantella?"

4. The following values can be increased to improve TCP/IP performance:

(tcp_2msl)
The tcp_2msl parameter defines the time connections will
remain in TIME_WAIT state - see RFC793.  By default, the value
is 240 (4minutes).  It can be reduced to 30 seconds with the
following:
# inconfig tcp_2msl 30
(tcp)

"tcp" is the maximum number of simultaneous tcp connections on a server.

The configuration file is in /etc/conf/sdevice.d (3rd field). The factory default is 1000 and the maximum can be set to 4096.

The limitation is related to select() /FD_SETSIZE, which limits the number of File Descriptors (FD) opened to 4096.

"man 3 select" states:

The behavior of these macros is undefined if a descriptor value is less than zero or greater than or equal to FD_SETSIZE. FD_SETSIZE is a constant defined in sys/select.h.

In UnixWare 7 and previous releases of UnixWare, its value
was 1024. FD_SETSIZE was increased to 4096 in UnixWare 7
Release 7.0.1. See ``Notices''.
(ticots)

/dev/ticots is typically invoked as the implied device in a call to socket or as the first argument in a call to t_open and is used to identify the transport protocol that will supply a connection-based transport service.

Basically, ticots is the module which is opened when you open a connection-oriented Unix domain socket.

The configuration file is in /etc/conf/sdevice.d (3rd field). The factory default is 1024 for UnixWare 7.1.3 and 256 for earlier versions and the maximum can be set to 8192.

(ticlts)
This is the connectionless UNIX domain socket
(AF_UNIX,SOCK_DGRAM).

The configuration file is in /etc/conf/sdevice.d (3rd field). The factory default is 1024 for UnixWare 7.1.3 and 256 for earlier versions and the maximum can be set to 1024.

(ticotsor)

This is the connection-oriented UNIX domain sockets (UDS) with "orderly release".

The configuration file is in /etc/conf/sdevice.d (3rd field) The factory default is 1024 for UnixWare 7.1.3 and 256 for earlier versions and the maximum can be set to 1024.

"ticots" and "ticotsor" are connection-oriented loopback transport provider that is used for UNIX domain sockets within a system, rather than over a network. "ticlts" is actually connectionless.

NOTE:     It is also recommended to increase the kernel parameters in:
/etc/conf/cf.d/stune

- Set ARG_MAX to the maximum as defined in /etc/conf/cf.d/mtune as:

# cd /etc/conf/bin
# ./idtune ARG_MAX 1048576

This increases the 'shell' limit should the following error be encountered: "argument list too long" or "Arg list too long" when, for example, "tar" tries to create a tarball with more than 7000+ files.

To test this, for example:
# mkdir -p /local/test
# cd /local/test
Create "testit":
i=0
while [ $i -le 8000 ]
do
    touch $i
    i=`expr $i + 1`
    echo $i
done
# chmod 700 testit
# ./testit
# tar cvf tarball.tar *
If you see:  ./testit: line 5: open file limit exceeded [Bad file
             number]

Then it's likely the number of "inodes" on that particular filesystem have been exceeded, for example, if it's a "memfs" Memory Filesystem.

- Increase MAXRSS, as appropriate, from it's default value of 0x800 as:

# ./idtune MAXRSS 0x1600

The re-link the kernel and re-boot using :

# ./idbuild -B
# init 6

See also

ta113164, "My application returns SOCKET accept failed [errno 126] when I try to open over 200 sockets every second."

ta111586, "Understanding, debugging and tuning UnixWare 7 telnet connections."

ta111865, "How do I tune my UnixWare 7 server to run Tarantella?"

For a full list of the networking parameters, see:

http://uw714doc.xinuos.com/en/SM_perform/_Networking_Parameters.html
http://osr600doc.xinuos.com/en/SM_perform/_Networking_Parameters.html

From the Xinuos technical article database, record 114966. Reproduced with permission. The original is at www.sco.com/ta/114966, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.