RSS Feed for This PostCurrent Article

HP-UX Socket Connection Limit

System wide limited by “tcp_conn_request_max”

# ndd -get tcp_conn_request_max
…to show the value
# ndd -h tcp_conn_request_max
…to show the ranges allowed
# ndd -set tcp_conn_request_max >value>
…to set the value

Limit by maxfiles per process. ulimit -n is a soft limit set by the kernel parameter maxfiles. You may change this with the standard HP-UX POSIX shell with ulimit:

#ulimit -Sn 500

It is recommended to use -S to set a soft limit which will allow ulimit to increase the value in the current environment. Without -S, ulimit makes the value a hard limit which can only be changed downward at a later time. ulimit is a shell builtin and it can be used in a shell script to set the limit for processes run from the script.

The second limit is maxfiles_lim which is the system-wide limit for maxfiles. ulimit (or the program library call setrlimit) can’t set the file descriptor limit higher than maxfiles_lim. It is good system practice to limit maxfiles to a low value if you have developers that might create a runaway program, and use ulimit only when necessary.

The last limit is nfile, the kernel parameter for all open files. maxfiles exists to help avoid exceeding nfile. If you have a program that needs to open 500 socket connections and the program will be run 10 times, nfile will have to be increased by 5000 to accomodate all the sockets.


Trackback URL


Sorry, comments for this entry are closed at this time.