@kzwin the application handles these gracefully using a standard try/rollback pattern. I believe the next release (or last release?) of Sentry also reduces the number of failures for some of these.
Thank you for replies. I had to look into these logs because sentry cleanup was taking much much longer. This is after I updated to newer version of sentry and forgot to update sentry path in the cronjob and I ended up missing a few weeks of sentry cleanup . I normally run with --days 50 and now I try running with --days 150 and this clean up job which normally takes a few hours at most now is not finished after 2 days. I see DELETE command in postgres from this worker. I even upgraded (2X memory, disk, cpu) postgres hardware to make it faster. cleanup job output is
sentry cleanup --days 150
Removing expired values for LostPasswordHash
Removing old NodeStore values
Removing GroupRuleStatus for days=150 project=*
Removing GroupTagValue for days=150 project=*
Removing TagValue for days=150 project=*
Removing GroupEmailThread for days=150 project=*
Removing expired values for EventMapping
How large is your EventMapping table? If it is massive, this may take a while. EventMapping is special case and doesn’t respect the --days argument. And on top of that, we don’t provide a nice index it’d need to make it really fast. You can manually add an index here if you want to help speed it up.
CREATE INDEX CONCURRENTLY
sentry_eventmapping_date_added
ON sentry_eventmapping (date_added);