Skip to content

Unexpected timeout setting value '1d' #277

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions