Hello Support
We are using Angular + .netCore
Version v7.1.0.0 [20240731]
Our application is continuously crashing at random times on azure, when we have analysed memory dump we found below error, need your urgent attention as this is happening on production server
Abp.EntityFrameworkCore.Uow.DbContextEfCoreTransactionStrategy.CreateDbContext<Abp.Zero.EntityFrameworkCore.AbpZeroCommonDbContext<Bit2Sky.Bit2EHR.Authorization.Roles.Role, Bit2Sky.Bit2EHR.Authorization.Users.User, Bit2Sky.Bit2EHR.EntityFrameworkCore.Bit2EHRDbContext>>(string, Abp.EntityFrameworkCore.IDbContextResolver) is synchronously waiting on System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[], int, bool), causing thread pool starvation. Your app may experience the following symptoms under load: Slow web requests Loss of throughput Request timeouts
Can we have your expert view on this error. let me know in case of any addtional information is required
4 Answer(s)
-
0
to give more informtion, in the application log below error is comming several time ERROR 2024-07-31 22:40:41,179 [86 ] e.Diagnostics.ExceptionHandlerMiddleware - An unhandled exception has occurred while executing the request. System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource
1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource
1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnection(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func
3 operation, Func3 verifySucceeded) at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.BeginTransaction(DatabaseFacade databaseFacade, IsolationLevel isolationLevel) at Abp.EntityFrameworkCore.Uow.DbContextEfCoreTransactionStrategy.CreateDbContext[TDbContext](String connectionString, IDbContextResolver dbContextResolver) at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.GetOrCreateDbContext[TDbContext](Nullable
1 multiTenancySide, String name) at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase3.get_Table() at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase
3.GetQueryable() at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase3.GetAllIncluding(Expression
1[] propertySelectors) at Castle.Proxies.Invocations.IRepository2_GetAll.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.IRepository
1Proxy.GetAll() at Castle.Proxies.Invocations.AbpTenantManager2_get_Tenants.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.TenantManagerProxy.get_Tenants() at Bit2Sky.Bit2EHR.Sessions.SessionAppService.GetCurrentLoginInformations() in D:\Bit2Sky\CSAAC\server\src\XXX.xxxx.Application\Sessions\SessionAppService.cs:line 45 at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinallyAndGetResult[T](Task
1 actualReturnValue, Func1 postAction, Action
1 finalAction) at Bit2Sky.Bit2EHR.Web.Session.PerRequestSessionCache.GetCurrentLoginInformationsAsync() in D:\Bit2Sky\CSAAC\server\src\Bit2Sky.Bit2EHR.Web.Core\Session\PerRequestSessionCache.cs:line 33 at Bit2Sky.Bit2EHR.Web.Controllers.UiController.Index() in D:\Bit2Sky\CSAAC\server\src\Bit2Sky.Bit2EHR.Web.Host\Controllers\UiController.cs:line 47 at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ExceptionContext context) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync() at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context) at Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context) -
0
Hi,
This is probably becasue of your Abp NuGet package references. Could you share your Abp version ?
-
0
-
0
Hi,
Thanks. If you can upgrade your Abp related packages to 6.4 or above, this problem should be fixed.