Skip to content

Unexpected timeout setting value '1d' #277

@mantasaudickas

Description

@mantasaudickas

Seems like PostgresAdvisoryLock is failing to parse statement timeout:

System.FormatException: Unexpected timeout setting value '1d'
   at Medallion.Threading.Postgres.PostgresAdvisoryLock.CapturedTimeoutSettings.ParsePostgresTimeout(String timeout) in /_/src/DistributedLock.Postgres/PostgresAdvisoryLock.cs:line 342
   at Medallion.Threading.Postgres.PostgresAdvisoryLock.CapturedTimeoutSettings..ctor(String statementTimeout, String lockTimeout) in /_/src/DistributedLock.Postgres/PostgresAdvisoryLock.cs:line 337
   at Medallion.Threading.Postgres.PostgresAdvisoryLock.CaptureTimeoutSettingsIfNeededAsync(DatabaseConnection connection, CancellationToken cancellationToken) in /_/src/DistributedLock.Postgres/PostgresAdvisoryLock.cs:line 211
   at Medallion.Threading.Postgres.PostgresAdvisoryLock.TryAcquireAsync(DatabaseConnection connection, String resourceName, TimeoutValue timeout, CancellationToken cancellationToken) in /_/src/DistributedLock.Postgres/PostgresAdvisoryLock.cs:line 55
   at Medallion.Threading.Internal.DistributedLockHelpers.ThrowTimeoutIfNull[T](ValueTask`1 task, String object) in /_/src/DistributedLock.Core/Internal/DistributedLockHelpers.cs:line 139
   at Medallion.Threading.Postgres.PostgresDistributedLock.<>c__DisplayClass27_0.<<AcquireWithTransactionAsyncInternal>g__AcquireAsync|0>d.MoveNext() in /_/src/DistributedLock.Postgres/PostgresDistributedLock.Transactions.cs:line 132
--- End of stack trace from previous location ---
   at Medallion.Threading.Postgres.PostgresDistributedLock.<>c__DisplayClass27_0.<<AcquireWithTransactionAsyncInternal>g__AcquireAsync|0>d.MoveNext() in /_/src/DistributedLock.Postgres/PostgresDistributedLock.Transactions.cs:line 132

PostgreSQL returns:

Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions