Cloud customer?
Start for Free>
Upgrade in MyJFrog >
What's New in Cloud >





Database Configuration Overview

Artifactory comes with a built-in embedded Derby database. Artifactory supports several databases that you can use depending on your requirements.

Accessing a Remote Database

When using an external database, you need a reliable, stable and low-latency network connection to ensure proper functioning of your system.

When using afull-DBconfiguration, we strongly recommend a high-bandwidth to accommodate the transfer of large BLOBs over the network.

Setup Flow

To set up yournewdatabase, you will need to perform the following steps:

  1. Create a database instance.
  2. Create an Artifactory user for the database.
  3. Install the appropriate JDBC driver.
  4. Set the database parameters in yoursystem.yamlconfiguration file.
  5. Start Artifactory.

To migrate yourexistingdatabase:

  • Import the metadata usingFull Import and Export(optional for migration, not required for a new installation).Changing the database does not automatically transfer your data to the new database.

*为一个完整的一步一步guide, follow the details in the specific page for each of the supported databases listedbelow.

Database Connection Settings

Add or change the below parameters for database connections settings under thesystem.yaml configuration file.

maxOpenConnections
The maximum number of pooled database connections (default: 100).
maxIdleConnections

The maximum number of pooled idle database connections (default: 10).

Tomcat Only

This parameter is applicable on Tomcat.

Default Home Directory

The default product home directory is defined according to the installation type. For additional details see theProduct Directory Structurepage.

Note:This guide uses$JFROG_HOMEto represent the product home directory.

How is connection pool for database locking done in Artifactory?

From version 6.0.0, the new database locking mechanism adds its own connection pool (defaults to the value of thepool.max.activevalue).

However, you may need to adjust your database connection limit to accept more connections. For example, if your database is set to accept up to 100 connections from each node, you may consider increasing the limit to 200 concurrent connections per-node, to accommodate the full utilization of the locking connection pool. Your database should accept the number of configured connections per-node multiplied by the number of the nodes in the cluster.



Choosing the Right Database

Artifactory uses Derby as the default database, which requires no additional configuration. Derby provides good performance for small to medium size loads. However, if you expect intensive usage or high load, high availability setup, and better tooling, we recommend that you use PostgreSQL(PostgreSQLv10.x to v13.x). Since o其他JFrog产品只支hth华体会最新官方网站持PostgreSQL,决定ing PostgreSQL for Artifactory will allow you to use the same database for the entire JFrog Platform.

Additionally, Artifactory supports the following pluggable database implementations:

For each of the supported databases you can find the corresponding example values in thesystem.yamlconfiguration file.


Checksum-Based Storage

Artifactory uniquely stores artifacts using checksum-based storage. For details, please refer toChecksum-Based Storage.


Modes of Operation

Artifactory supports two modes of operation:

  • Metadata in the database and binaries stored on the file system (This is the default and recommended configuration).
  • Metadata and binaries stored as BLOBs in the database

Database Tuning for Heavy Loads in Artifactory

You can alter the maximum connections an Artifactory node can open to the database by modifying themaxOpenConnectionsparameter in theArtifactory System YAML. The default value of themaxOpenConnectionsparameter is 100. You must set the value of the parameter in theartifactory,access, and元数据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

In the example, the total number of open database connections is 1200.

Copyright © 2022 JFrog Ltd.