Overview
If your FileCatalyst Server is installed on a Linux/Unix system and after few hours/days of using the FileCatalyst Server an error of Too many open files is observed it is an indication that the FileCatalyst Server service is hitting the default soft open file limit which is 1024. This is a default value allocated to all running applications on Linux/Unix system.
Environment
FileCatalyst Server v3.0 or later. Linux OS.
Resolution
Configure the ulimit values and run the commands below as a root user.
- Stop the FileCatalyst Server service. Run the following command:
service fcserver stop
- Set ulimit values for open files at the application level. Edit /etc/init.d/fcserver using nano or vi and add the following lines:
ulimit -Sn 60000 ulimit -Hn 60000
In this example, we set the ulimit value for the FileCatalyst Server is 60000.
- Reload the systemd manager configuration to use the new ulimit values using the command below:
systemctl daemon-reload
Alternatively, you can also reboot the Linux OS running the FileCatalyst Server.
- To verify if the changes we made are applied to the FileCatalyst Server use the following steps:
- Find Process ID (PID) of FileCatalyst Server. Run the following command and note down the PID of the server which is the very first value right next to the user value.
ps -ef | grep java
Output:
[email protected]:/etc/init.d# ps -ef | grep java root 985 804 99 11:29 ? 00:00:15 /usr/bin/java -XX:MaxDirectMemorySize=1G -XX:+UseConcMarkSweepGC -Dsun.java2d.noddraw=true -Dsun.java2d.d3d=false -Xms4096m -Xmx4096m -Djava.library.path=./lib:. -classpath ./lib/wrapper.jar:./FileCatalystServer.jar…
In the following example, the user is “root” and the PID value is 985.
- To check if the limits were applied run:
cat /proc/{PID}/limits
Example:
cat /proc/985/limits
Limit Soft Limit Hard Limit Units Max open files 60000 60000 files
Note: These changes will survive on reboot and no additional changes needed.
|