Sửa lỗi quá nhiều tệp mở trên confluence/jira – Fix too many open files error confluence/jira

on

06-Dec-2020 10:05:39.962 SEVERE [https-jsse-nio-7443-Acceptor] org.apache.tomcat.util.net.Acceptor.run Socket accept failed
        java.io.IOException: Too many open files
               at java.base/sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
           

Solution
Increase the maximum open file limit:


Step 1. shutdown service confluence:
/etc/init.d/confluence stop


Step 2. Run the following command in your terminal to check the file handler count limit in your system:
ulimit -aS | grep open


Step 3. To set the limit of the file handler, add the following line into the /bin/setenv.sh file. You can modify the number based on your application’s needs
ulimit -n 32768


Step 4. Add two line below into limits.conf:
vim /etc/security/limits.conf
confluence soft nofile 32768
confluence hard nofile 32768


Step 5. Check hardlink & softlink:
su -s confluence
ulimit -Hn
ulimit -Sn


Step 6. Start the confluence service:
/etc/init.d/confluence start

Leave a Reply

Your email address will not be published. Required fields are marked *