Concourse web continuously logging error "duplicate key value violates unique constraint"
search cancel

Concourse web continuously logging error "duplicate key value violates unique constraint"

book

Article ID: 426685

calendar_today

Updated On:

Products

Concourse for VMware Tanzu

Issue/Introduction

Concourse web continuously logging the following errors:

{"timestamp":"2026-01-09T06:19:17.825467904Z","level":"error","source":"atc","message":"atc.register-worker.failed-to-save-worker","data":{"error":"pq: duplicate key value violates unique constraint \"workers_addr_key\"","session":"15740063"}}
{"timestamp":"2026-01-09T06:19:17.825571586Z","level":"error","source":"tsa","message":"tsa.connection.channel.command.register.bad-response","data":{"command":"forward-worker","remote":"###.##.###.##:38096","session":"3073611.4.1.91387","status-code":500}}

 

These are logged every second and can quickly fill up the log files.

Cause

Stalled concourse workers

Resolution

Prune any stalled workers

# Check for stalled workers
fly -t <Concourse Target> workers -d
# Remove stalled workers
fly -t <Concourse Target> prune-worker -a
# Confirm workers are removed
fly -t <Concourse Target> workers -d