Limits on the number of sockets set

The maximum number of sockets supported by an IMS Connect instance is affected by four parameters: MAXSOC, MAXSOCKETS, MAXFILEPROC, and FILEPROCMAX. IMS Connect can open ports only if the MAXSOC parameter is compatible with the UNIX System Services MAXFILEPROC parameter, or if a valid override is in effect.

The MAXSOC= parameter on the HWSCFGxx member of the IMS PROCLIB data set specifies the total number of sockets that IMS Connect will support. However, the actual number of client sockets available is less than the total MAXSOC number because IMS Connect uses one socket per port as a listener socket, the optional product IMS Connect Extensions for z/OS uses two sockets, and other vendor products might also use sockets.

The z/OS UNIX System Services parameters MAXSOCKETS and MAXFILEPROC are set on the BPXPRMxx member of the SYS1.PROCLIB data set and affect the total number of sockets as follows:

  • The MAXSOCKETS parameter sets a limit for the total number of sockets in a system. To learn more, see MAXSOCKETS.

  • The MAXFILEPROC parameter sets the maximum number of sockets for any user ID (this is the IMS Connect address space user ID). To learn more, see MAXFILEPROC.

FILEPROCMAX is a security setting parameter that can restrict the number of sockets for a user ID just as MAXFILEPROC can. It is originally specified on the ADDUSER statement for RACF. It can be altered by the ALTUSER (Alter user profile) command.

IMS Connect cannot open any ports unless its MAXSOC parameter value is less than or equal to the MAXFILEPROC parameter value, or to the FILEPROCMAX value if the FILEPROCMAX field of the OMVS segment of a user's profile is used to override MAXFILEPROC. The following methods briefly describe how to ensure MAXSOC compatibility. For details, see TCPIP statement.

  1. Before you start IMS Connect, check that the MAXSOC value is less than or equal to the MAXFILEPROC value. Decrease the MAXSOC value if necessary. Alternatively, to increase the MAXFILEPROC value, consult with your UNIX System Services administrator.

  2. If IMS Connect is running, check the MAXFILEPROC parameter value for IMS Connect with the following UNIX commands:

    • To determine the PID (process ID) for IMS Connect, issue: D OMVS,V.

    • To check the MAXFILEPROC value for IMS Connect, issue the following command and include the PID from the previous step: D OMVS,L,PID=.

    If the MAXFILEPROC value is lower than the MAXSOC value, use the ALTUSER command to assign an equal or greater value to the FILEPROCMAX field of the OMVS segment of the user ID that is used to start IMS Connect. To learn more, see Defining IMS Connect security.

  3. This method is not recommended but is retained for historical context: Grant UNIX System Services superuser privileges to IMS Connect by using the RACF ALTERUSER command to assign an OMVS segment with a UID of 0 to the user ID of the IMS Connect started task. To learn more, see Superusers in z/OS UNIX.

Messages related to socket limits

The following IMS Connect and UNIX System Services messages can help you determine socket limit status.

If incompatible MAXSOC and MAXFILEPROC or FILEPROCMAX values are detected, or if IMS Connect is not granted superuser privileges, IMS Connect does not open any ports and issues the following message:

  • HWSP1415E TCP/IP SOCKET FUNCTION CALL FAILED; F=SETRLIMI, R=-1, E=139, M=SDOT

If IMS Connect successfully opens ports, the following messages are issued if the number of sockets on an open port reaches or approaches a specified limit.

  • When the MAXSOC parameter limit is reached, IMS Connect issues message HWSS0771W as follows:

    • HWSS0771W LISTENING ON PORT=portid FAILED; R=rc, S=sc, M=mc

  • When the number of sockets approaches the MAXFILEPROC parameter value, UNIX System Services issues message BPXI040I. For example, if the MAXFILEPROC limit is 400, the following message is issued:

    • BPXI040I PROCESS LIMIT MAXFILEPROC HAS REACHED 85% OF ITS CURRENT 400.

      Note that message BPXI040I is displayed only if LIMMSG is set to SYSTEM or ALL in the SYS1.PARMLIB(BPXPRMxx) data set or by using the SETOMVS command.

  • When the MAXFILEPROC parameter value is reached, IMS Connect issues messages HWSP1415E and HWSS0771W as follows:

    • HWSP1415E TCP/IP SOCKET FUNCTION CALL FAILED; F=ACCEPT4, R=-1, E=124, M=SDCO

    • HWSS0771W LISTENING ON PORT=portid FAILED; R=rc, S=sc, M=mc

To learn more about socket limit messages, see Socket number warnings.