Base solution for your next web application
Open Closed

Redis cache perrequest error log #10891


User avatar
0
Ricavir created
  • Abp 6.2.2
  • Angular
  • .NET5

Hi abp team,

I'm getting following error several times per day :

ERROR 2022-02-11 10:24:53,841 [86   ] me.Caching.Redis.AbpPerRequestRedisCache - System.ObjectDisposedException: IFeatureCollection has been disposed.
Object name: 'Collection'.
   at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ThrowContextDisposed()
   at Microsoft.AspNetCore.Http.DefaultHttpContext.get_Items()
   at Abp.Runtime.Caching.Redis.AbpPerRequestRedisCache.TryGetValueAsync(String key)
   at Abp.Runtime.Caching.AbpCacheBase`2.GetAsync(TKey key, Func`2 factory)
System.ObjectDisposedException: IFeatureCollection has been disposed.
Object name: 'Collection'.
   at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ThrowContextDisposed()
   at Microsoft.AspNetCore.Http.DefaultHttpContext.get_Items()
   at Abp.Runtime.Caching.Redis.AbpPerRequestRedisCache.TryGetValueAsync(String key)
   at Abp.Runtime.Caching.AbpCacheBase`2.GetAsync(TKey key, Func`2 factory)

Is it a problem we can fix ? Is it due to redis data expiration policy ?


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ricavir

    I have created an issue about this, https://github.com/aspnetzero/aspnet-zero-core/issues/4248. We will investigate and work on it.

  • User Avatar
    0
    Ricavir created

    Hi @Ismcagdas,

    I still have these warnings wit Abp 8.2.0. This should have been fixed, no ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Ricavir

    When I look at https://github.com/aspnetboilerplate/aspnetboilerplate/commit/bf67e2781d57dc0989a9d339c56f91c4418d00fc, it should be fixed. Could you share a sample stack trace of an error ?

  • User Avatar
    0
    Ricavir created

    Sure,

    Here is the logs :

    WARN 2023-10-25 07:03:09,655 [25 ] me.Caching.Redis.AbpPerRequestRedisCache - IFeatureCollection has been disposed.
    Object name: 'Collection'.
    System.ObjectDisposedException: IFeatureCollection has been disposed.
    Object name: 'Collection'.
    at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ThrowContextDisposed()
    at Microsoft.AspNetCore.Http.DefaultHttpContext.get_Items()
    at Abp.Runtime.Caching.Redis.AbpPerRequestRedisCache.TryGetValueAsync(String key)
    WARN 2023-10-25 07:03:09,655 [25 ] me.Caching.Redis.AbpPerRequestRedisCache - IFeatureCollection has been disposed.
    Object name: 'Collection'.
    System.ObjectDisposedException: IFeatureCollection has been disposed.
    Object name: 'Collection'.
    at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ThrowContextDisposed()
    at Microsoft.AspNetCore.Http.DefaultHttpContext.get_Items()
    at Abp.Runtime.Caching.Redis.AbpPerRequestRedisCache.TryGetValueAsync(String key)
    
  • User Avatar
    0
    ismcagdas created
    Support Team

    I have created a new issue to check this, please follow https://github.com/aspnetboilerplate/aspnetboilerplate/issues/6812