Skip to content

Microsoft.Extensions.Caching.StackExchangeRedis disposing connections while in use #36092

@antonioortizpola

Description

@antonioortizpola

Describe the bug

As stated here StackExchange/StackExchange.Redis#1498

Getting the following error randomly - generally have to kill one of the web instances to "fix" it
Any ideas, is this fix in a new version?

Key was: GBHCVTWO-PC:CASHWEB:900:PCP-1033346:0606:1.00:636821095169080876 System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'RD0003FF6F2022'.
at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor1 processor, ServerEndPoint server) at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor1 processor, ServerEndPoint server)
at BusinessObjects.Caching.RedisCacheProvider.StringSet(String key, String value, Nullable`1 expiry)
at BusinessObjects.Caching.RedisCacheProvider.SetWithExpiry[T](String key, T value, TimeSpan expiration)

Exception: Cannot access a disposed object.
Object name: 'RD0003FF6F2022'.
Source: StackExchange.Redis

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresfeature-cachingIncludes: StackExchangeRedis and SqlServer distributed caches

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions