UNIX
Increasing the number of files a process on a UNIX system can open also increases the number of sockets that process can open. The operating system uses file descriptors to handle filesystem files as well as pseudo files, such as connections and sockets.
You need the following number of sockets for each client connection:
- WS — one socket per connection
- HTTP Polling — two sockets per connection
Use the ulimit command to increase the number of open files. You can
do this in one of the following ways:
- As a global setting.
This can be set by your network administrator.
- In the start script for
Diffusion™
. Edit the diffusion_installation/bin/diffusion.sh file to add the following line at the start:
ulimit -n open_files
Where the value of open_files is any suitable integer value, for example 8192.
You can use the java.lang:type=OperatingSystem MBean to inspect the
number of files on your UNIX operating system. See the following properties:
- MaxFileDescriptorCount
- The total number of files that a process on a UNIX system can open. This is the number that you can set with ulimit -n.
- OpenFileDescriptorCount
- The number of files that are currently open.