En un cliente con la versión 1.11.2.2 se tienen varios planilleros que normalmente en día de pago generan las planillas concurrentemente, luego de que las planillas se generen varias veces, el servicio ya no genera planilla y es necesario reiniciarlo para que vuelva a generar. El mensaje que muestre en el servicio de planilla es el siguiente:
2020-01-16 00:02:24,861 [ThreadGestorCola] INFO Aseinfo.VH4.WindowsServices.Salarios.GenPlaHostWcf - Iniciando periodo a generar: ID de Sesión = edfc467f-23d5-47e4-a9fb-e7a75f3025c2 - Fecha = 1/16/2020 12:02:24 AM
2020-01-16 00:02:39,892 [ThreadGestorCola] ERROR Aseinfo.VH4.WindowsServices.Salarios.GenPlaHostWcf - Al enviar la orden de inicio al WCF de calculo de planilla
System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> 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.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.EntityClient.EntityConnection.<Open>b__2()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation)
at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
--- End of inner exception stack trace ---
at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1[TResult](IEnumerable`1 sequence)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate)
at Aseinfo.VH4.WindowsServices.Salarios.GeneraPeriodoPlanillaWcfService.Iniciar(IniciarPlanillaData data) in C:\vh4\VH4\WindowsServices\GeneraPlanillaWindowsService\Salarios\GeneraPeriodoPlanillaWcfService.cs:line 84
at Aseinfo.VH4.WindowsServices.Salarios.GenPlaHostWcf.Execute() in C:\vh4\VH4\WindowsServices\GeneraPlanillaWindowsService\Salarios\GenPlaHostWCF.cs:line 128
Alguna idea de porque puede dar este error y si hay una forma de solucionarlo.
Leí en otras preguntas que normalmente pasa un deadlock, entonces se deben optimizar los procedimientos de inicialización y finalización y revisar las transacciones, no se si este es el mismo caso
asked
29 Jan '20, 19:24
Carlos Soria ♦♦
1.2k●131●141●148
accept rate:
60%
Podría mostrarnos la información de inicio de log, para ver cuantas nominas concurrentes estan configuradas.