Database tuning for heavy loads in Artifactory

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
ft:sourceType
Paligo

You  can alter the maximum connections an Artifactory node can open to the database by modifying the maxOpenConnections parameter in the Artifactory System YAML. The default value of the maxOpenConnections parameter is 100. You must set the value of the parameter in the artifactory, access, and metadata sections of the system YAML file. Once you set the value, the Artifactory node will open up that many database connections. Therefore, ensure that the database can accommodate the total number of connections all Artifactory nodes can open.

Use the following formula to determine the value of the parameter.

Total number of connections = (number of nodes) * ((artifactory.database.maxOpenConnections * 2) + access.database.maxOpenConnections + metadata.database.maxOpenConnections) + 50 

The additional 50 are to provide extra breathing room in situations where all database connection pools are exhausted.

The following sample shows an example.

artifactory:
  database:
    maxOpenConnections: 300
...   
access:
  database:
    maxOpenConnections: 300
...
metadata:
  database:
    maxOpenConnections: 300