Skip to content

Log a hint when an audit retention pass exceeds the command timeout - #6203

Open
ramonsmits wants to merge 1 commit into
audit-retention-delete-planfrom
audit-retention-timeout-hint
Open

ramonsmits wants to merge 1 commit into
audit-retention-delete-planfrom
audit-retention-timeout-hint

Conversation

@ramonsmits

@ramonsmits ramonsmits commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

When a retention pass exceeds the command timeout, the log line and the retention custom check now name the timeout and the setting that increases it:

The AuditMessages audit retention pass exceeded the command timeout of 30 seconds. If this continues, increase the ServiceControl.Audit/Database/CommandTimeout setting

  • IAuditPartitionManager has a new method IsCommandTimeout, with a default that returns false.
  • SQL Server: error number -2 of SqlException.
  • PostgreSQL: an NpgsqlException with a TimeoutException inside.
  • Other errors keep the existing log line.

A test covers the hint in the custom check.

Note for the review

Database/CommandTimeout applies to all commands of the audit persister, also to ingestion. A separate timeout for retention can be a better solution.

@ramonsmits
ramonsmits added this pull request to stack #6204 November 27, 2026 08:25
@ramonsmits ramonsmits changed the title ✨ Log a hint when an audit retention pass exceeds the command timeout Log a hint when an audit retention pass exceeds the command timeout Nov 27, 2026
@ramonsmits
ramonsmits force-pushed the audit-retention-timeout-hint branch from 1ccd2bd to 621d49c Compare November 27, 2026 08:26
The log line and the retention custom check now name the command timeout and the setting that increases it.
@ramonsmits
ramonsmits force-pushed the audit-retention-timeout-hint branch from 621d49c to 7c9ebf2 Compare November 27, 2026 08:26
@ramonsmits
ramonsmits marked this pull request as ready for review November 27, 2026 08:27
@ramonsmits ramonsmits self-assigned this Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant