ARTIFACTORY: Resolving Open File Limit Issues for Artifactory on Linux Servers

AuthorFullName__c
Muniraju M K
articleNumber
000006147
FirstPublishedDate
2024-07-14T11:29:55Z
lastModifiedDate
2025-07-22

ARTIFACTORY: Resolving Open File Limit Issues for Artifactory on Linux Servers

The issue appears to be linked to the server's operating system where Artifactory is hosted, and it's influenced by your current workload.
To resolve this issue, you should adjust the ulimit values for the "artifactory" user.


Step-by-Step Guide to Increase ulimit Values

Step 1: Identify Processes and Open File Usage

Run the following command to identify the top 10 processes using the most open files:
lsof | awk '{ print $1 " " $2; }' | sort -rn | uniq -c | sort -rn | head -10

Understanding Limits: There are two types of limits for open files:
  • Soft limit: Current limit that can be adjusted.
  • Hard limit: Maximum number of open files allowed.

Step 2: Check and Adjust Limits
  • Check the current hard limit:
ulimit -Hn
  • Check the current soft limit:
ulimit -Sn
  • To increase the soft limit temporarily:
ulimit -n <number of open files>
  • Ensure that this number does not exceed the hard limit.

Step 3: Set Limits Permanently

For permanent changes (for users other than root), edit the /etc/security/limits.conf file. Add or modify lines like this:
<username> soft nofile 8192
<username> hard nofile 8192

Replace <username> with the actual username. This example sets both soft and hard limits to 8192 files.

Additional Recommendations: It's advisable to set the soft limit higher than your current usage but within the hard limit. Doubling the current soft limit is a good starting point.

For further detailed guidance on resolving this issue, refer to this practical walkthrough: Too Many Open Files - Linux.
This should help in resolving the issue related to Artifactory's performance due to file handling limits on your server.