Cleanup of the “_uploads” directory

ARTIFACTORY: What is the “_uploads” folder under Artifactory Docker repositories?

AuthorFullName__c
Fadi Rouhana
articleNumber
000005322
ft:sourceType
Salesforce
FirstPublishedDate
2022-06-28T14:23:43Z
lastModifiedDate
2024-03-10T07:49:13Z
VersionNumber
4
We can set/modify the following system properties in
$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties
file in order to configure the cleanup job the is responsible to clean up the “_uploads” directory:
  • artifactory.docker.cleanup.maxAgeMillis – this property determines the age of files to be deleted by the job.
  • artifactory.docker.cleanup.uploadsTmpFolderJobSecs – this property determines how frequently this job should run.

For instance, to set the maximum age of a layer to 24 hours and to schedule the job to run once per day, add the sample configuration below to the
$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties
file and restart Artifactory for the chances to take effect:
artifactory.docker.cleanup.maxAgeMillis=86400000
artifactory.docker.cleanup.uploadsTmpFolderJobSecs=86400

Note: Changing the frequency may affect the performance of Artifactory based on the job's frequency, the number of local repositories, and the volume of files we need to delete.

Important: When configuring the cleanup job, make sure to take into account situations where a slow client uploads a large Docker image. In these cases, the delta between the deployment of the first layer to the upload of the manifest file must not be greater than the “artifactory.docker.cleanup.maxAgeMillis” property, otherwise, the layer might be removed and the push will fail consequently.