ARTIFACTORY: Resolving “Failed to execute work queue Persistent Queue Triggering Federated task” error in Artifactory
Introduction
If you come across the following log messages in your Artifactory logs while performing a federated repo sync:
2023-09-11T14:51:20.000Z [jfrt ] [WARN ] [bf02df8967551b8d] [tifactoryConcurrentExecutor:88] [1b8d|art-exec-410044] - Task org.artifactory.concurrent.ArtifactoryRunnable@2aa6bae1 was rejected by scheduler: Task org.artifactory.concurrent.ArtifactoryRunnable@2aa6bae1 rejected from java.util.concurrent.ThreadPoolExecutor@6f9ac0ac[Running, pool size = 64, active threads = 64, queued tasks = 10000, completed tasks = 16631214] 2023-09-11T14:51:20.000Z [jfrt ] [ERROR] [bf02df8967551b8d] [o.a.w.WorkQueueImpl:138 ] [1b8d|art-exec-410044] - Failed to execute work queue Persistent Queue Triggering Federated <REPO> task
The error is typically triggered when Artifactory's federated repo executor exhausts its configured core pool size. This article will guide you through the steps to address this issue.
Identifying the Problem
To understand the issue, let's break down the log entry above:-
The pool's maximum queue size is set to 10,000. - The maximum pool size is set to 64.
The error indicates that Artifactory's federated repo executor is using all the available configured core pools, which, in this instance, are 64.
Solution
To address this, you can fine-tune the "maxPoolSize" and "poolMaxQueueSize" values as detailed in the following steps:-
Locate the Artifactory System Properties file at "$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties". -
Update the following system properties with higher values:
- artifactory.federated.repo.executor.maxPoolSize
- artifactory.federated.repo.executor.poolMaxQueueSize
Please ensure that you restart the Artifactory nodes subsequently to apply the modifications.
Configuration Values:
Here are the default and suggested values for your reference:
Default Values:
- artifactory.federated.repo.executor.maxPoolSize=4 * # of processors (system-dependent)
- artifactory.federated.repo.executor.poolMaxQueueSize=10000
Suggested Values:
- artifactory.federated.repo.executor.maxPoolSize=8 * # of processors (system-dependent)
- artifactory.federated.repo.executor.poolMaxQueueSize=100000
Monitoring
After implementing the aforementioned changes, it is essential to monitor the Artifactory nodes. Initiate a full synchronization and verify whether the error has been resolved.