#general

Trouble Setting Trace Retention Days in SigNoz

TLDR Jose faced issues with trace retention settings. vishal-signoz advised connecting to SQLite DB and clearing TTL status table to update the retention setting.

Powered by Struct AI
6
6mo
Solved
Join the chat
Mar 26, 2023 (6 months ago)
Jose
Photo of md5-827f15e2b6bae6a945bc10a5d44205a6
Jose
04:02 PM
Hi everyone, I'm struggling withe setting the trace retention days. I've changed it to 5 days, but several days have passed and the setting never persisted. I've tried recreating the docker container, restarting, etc. But still the issue:
Image 1 for Hi everyone, I'm struggling withe setting the trace retention days. I've changed it to 5 days, but several days have passed and the setting never persisted. I've tried recreating the docker container, restarting, etc. But still the issue:
04:02
Jose
04:02 PM
Is there a way to force this? Or Delete all data and restart?
08:08
Jose
08:08 PM
I'm running signoz on an ec2 instance (t3a.2xlarge)
Mar 27, 2023 (6 months ago)
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
04:21 AM
Which SigNoz version are you using Jose?
In latest version there are some improvements on retention.
Jose
Photo of md5-827f15e2b6bae6a945bc10a5d44205a6
Jose
11:27 AM
0.17.0, the latest one. I've even block all incoming traffic so as not to have new traces and process the remaining one....still kept in that loop
Mar 29, 2023 (6 months ago)
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
05:02 AM
You can connect to SQLite DB and clear TTL status table to allow updating retention setting.
If you are using docker follow below steps:

Connect to query-service
docker exec -it query-service sh

Run the following:
# install sqlite
apk update
apk add sqlite

# open sqlite with signoz.db
sqlite3 /var/lib/signoz/signoz.db

# (sqlite shell) check existing ttl status
select * from ttl_status;

# delete all rows of ttl_status
DELETE FROM ttl_status;