XRAY: Tune Xray Indexing using Timeout Settings and AQL Configuration

Products
JFrog_Xray
Content Type
User_Guide
AuthorFullName__c
Piyush Panda
articleNumber
000006862
FirstPublishedDate
2026-02-12T08:22:12Z
lastModifiedDate
2026-02-12

XRAY: Tune Xray Indexing using Timeout Settings and AQL Configuration

Problem

When indexing large Artifactory repositories through JFrog Xray, the operation may fail to complete or result in timeout errors, even if the Xray service resources appear stable. This issue typically manifests as Xray logs indicating the repository indexing operation timed out before completion, or repositories remaining in a perpetual "indexing" state.

The root cause of these issues is often the default system limits. By default, Xray allows 40 minutes for a repository indexing operation and uses the Artifactory Storage Summary API to retrieve artifact lists. For massive repositories, the 40-minute window may be insufficient, and the standard API may be less efficient than database-level queries.

Log Example (Xray Server Log) In the example below, Xray begins fetching the file list, but the connection closes exactly 40 minutes later due to the timeout.

# Xray fetches files list from Artifactory
2025-12-02T13:15:48.069Z [jfxid] [INFO ] [1b2c3d4e5f6a7b8c] [repo:259] [indexRepoExistsContent] Start downloading file from storage api for index repo event, Repo name:npm-local-prod, repo package-type: npm url: /api/storage/npm-local-prod?list&deep=1&listFolders=0&mdTimestamps=1

# [40 Minutes elapse here]

# Connection is closed softly, causing the Indexing failure

2025-12-02T13:55:48.074Z [jfxid] [ERROR] [1b2c3d4e5f6a7b8c] [request_response_utils:63] [indexRepoExistsContent] closeQuietly error = read tcp 127.0.0.1:46770->127.0.0.1:8046: use of closed network connection

Resolution

To resolve this issue, you can increase the system timeout settings and switch to a more performant query method (AQL). These changes require modifying the Xray system.yaml configuration file: https://jfrog.com/help/r/jfrog-installation-setup-documentation/xray-system-yaml 

1. Increase the Repository Indexing Timeout

If your primary issue is the operation aborting before completion, you should increase the default timeout window.

In the system.yaml file, under the server section, add the following configuration to increase the limit to 4 hours (240 minutes):
server:
  indexRepositoryTimeoutMinutes: 240

2. Enable AQL-Based Indexing 

You may observe requests in the Artifactory router-request.log with exceptionally high duration values (measured in milliseconds), as shown in the example below. This may cause the timeout discussed above. 
2026-02-14T09:15:22.418Z|1b2c3d4e5f6a7b8c|::1|admin|GET|/api/storage/npm-local-prod|200|-1|482910552|3104822|curl/8.5.0

 

Switching from the standard Storage API to Artifactory Query Language (AQL) provides significantly better performance and filtering. By default, only Conan repositories use AQL. You can expand this to other package types to reduce indexing time.

In the system.yaml file, under the xray section, configure the indexRepoPkgsTypeWithAql property:
xray:
  config:
    indexRepoPkgsTypeWithAql: "conan,maven,docker"      # Enable AQL for multiple specific package types

Values: This property is case-insensitive. You may list specific package types (comma-separated), use all to enable AQL for every package type, or none to disable it entirely (default to Storage API)