XRAY: How to fix Xray error: ”temporary file size exceeds temp_file_limit” (SQLSTATE 53400)

Products
JFrog_Xray
Content Type
Installation_Setup
AuthorFullName__c
Jian Sun
articleNumber
000006802
FirstPublishedDate
2025-12-29T09:10:19Z
lastModifiedDate
2025-12-29

XRAY: How to fix Xray error: ”temporary file size exceeds temp_file_limit” (SQLSTATE 53400)

Introduction 

During Xray PublicData (vulnerability database) online syncing / onboarding, the update may fail and the log shows: 
Failed to complete online PublicData update
 --- at /go/src/jfrog.com/xray/backend/service/updates/updater.go:942 (updater.handlePossiblyAbortedError) ---
Caused by: Failed to process online PublicData updates
 --- at /go/src/jfrog.com/xray/backend/service/updates/updater.go:570 (updater.updateProcessCommon) ---
Caused by: Failed processing onboarding PublicData update
 --- at /go/src/jfrog.com/xray/backend/service/updates/executor/csv_updates_executor.go:179 (csvExecutor.ProcessUpdates) ---
Caused by: Failed to recreate indices and constraints for onboarding PublicData update
 --- at /go/src/jfrog.com/xray/backend/service/updates/executor/csv_updates_executor.go:298 (csvExecutor.processOnboarding.func1) ---
Caused by: ERROR: temporary file size exceeds temp_file_limit (4194304kB) (SQLSTATE 53400)

Root Cause

The root cause is a PostgreSQL limitation: temp_file_limit is set too low.

While Xray rebuilds indexes/constraints during onboarding, PostgreSQL may generate large temporary files (sort/hash), exceeding temp_file_limit and aborting the operation, which will cause the error SQLSTATE 53400.


Resolution


Ask the PostgreSQL administrator to increase temp_file_limit (recommended: set to unlimited), then rerun the PublicData sync.


Check current value
SHOW temp_file_limit;
Set to unlimited (example)
ALTER SYSTEM SET temp_file_limit = -1;
SELECT pg_reload_conf();

If needed, restart Xray services so they will pick up the new DB settings, then trigger the PublicData sync again, and the error should be fixed now.