1

Closed

SqlPublisher unstable

description

If SqlPublisher is configured, after some time the log is flodded with error messages like the following.
This is due to an invalid usage of entityframework: the DbContext is kept as singleton which is not supported.
Expect a fix soon ;-)

2015-02-17 14:52:19,298 [9] DEBUG Wolfpack [(null)] - Received call to WebService: http://web02.somehost.at:802/api/notification/notify
2015-02-17 14:52:19,300 [14] DEBUG Wolfpack [(null)] - Received call to WebService: http://web02.somehost.at:802/api/notification/notify
2015-02-17 14:52:19,306 [9] INFO Wolfpack [(null)] - Received Notification (HealthCheck) d44d8945-52ef-45f9-bfd2-0864a7b41d73
2015-02-17 14:52:19,306 [14] INFO Wolfpack [(null)] - Received Notification (HealthCheck) 11a8b8ae-d32e-4121-a157-474550fc6d1d
2015-02-17 14:52:19,310 [9] ERROR Wolfpack [(null)] - IncidentId:f249d5e5-b29c-44f2-8a96-dcebf73e550c; Encountered 'ApplicationException' during 'WebService Call: http://web02.somehost.at:802/api/notification/notify'; Message:=System.ApplicationException: Step failure ---> System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.InvalidOperationException: Die Verbindung wurde nicht geschlossen. Der aktuelle Status der Verbindung ist 'Verbindung wird hergestellt'.
bei System.Data.ProviderBase.DbConnectionClosedConnecting.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
bei System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource
1 retry)
bei System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry)
bei System.Data.SqlClient.SqlConnection.Open()
bei System.Data.Entity.Infrastructure.Interception.InternalDispatcher
1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action2 operation, TInterceptionContext interceptionContext, Action3 executing, Action3 executed)
bei System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
bei System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
bei System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func
1 operation)
bei System.Data.Entity.Core.EntityClient.EntityConnection.Open()
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Data.Entity.Core.EntityClient.EntityConnection.Open()
bei System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
bei System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
bei System.Data.Entity.Core.Objects.ObjectQuery
1.<>c__DisplayClass7.<GetResults>b__5()
bei System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func1 operation)
bei System.Data.Entity.Core.Objects.ObjectQuery
1.GetResults(Nullable1 forMergeOption)
bei System.Data.Entity.Core.Objects.ObjectQuery
1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
bei System.Data.Entity.Internal.LazyEnumerator1.MoveNext()
bei System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable
1 source)
bei System.Linq.Queryable.FirstOrDefault[TSource](IQueryable1 source, Expression1 predicate)
bei Wolfpack.Core.Repositories.Sql.SqlRepository.GetById(Guid id, NotificationEvent& notification) in d:\Code\Wolfpack_main\Solutions\Wolfpack.Core\Repositories\Sql\SqlRepository.cs:Zeile 37.
bei Wolfpack.Core.Publishers.Sql.SqlPublisher.Consume(NotificationEvent message) in d:\Code\Wolfpack_main\Solutions\Wolfpack.Core\Publishers\Sql\SqlPublisher.cs:Zeile 29.
bei Magnum.Extensions.ExtensionsToEnumerable.Each[T](IEnumerable1 collection, Action1 callback)
bei Wolfpack.Core.MagnumMessenger.Wolfpack.Core.Interfaces.IMessenger.Publish(NotificationEvent message) in d:\Code\Wolfpack_main\Solutions\Wolfpack.Core\Messenger.cs:Zeile 89.
bei Wolfpack.Core.WebServices.Strategies.Steps.RepublishMessageStep.Execute(WebServiceReceiverContext context) in d:\Code\Wolfpack_main\Solutions\Wolfpack.Core.WebServices\Strategies\Steps\RepublishMessageStep.cs:Zeile 12.
bei Wolfpack.Core.Pipeline.DefaultPipeline1.Execute(T context) in d:\Code\Wolfpack_main\Solutions\Wolfpack.Core\Pipeline\DefaultPipeline.cs:Zeile 37.
--- Ende der internen Ausnahmestapelüberwachung ---
bei Wolfpack.Core.WebServices.Strategies.WebServiceReceiverStrategy.Execute(NotificationEvent notification) in d:\Code\Wolfpack_main\Solutions\Wolfpack.Core.WebServices\Strategies\WebServiceReceiverStrategy.cs:Zeile 40.
bei Wolfpack.Core.WebServices.Modules.NotificationModule.<.ctor>b__1(Object request) in d:\Code\Wolfpack_main\Solutions\Wolfpack.Core.WebServices\Modules\NotificationModule.cs:Zeile 33.
bei CallSite.Target(Closure , CallSite , Func
2 , Object )
bei Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)
Closed Feb 17, 2015 at 2:39 PM by gentledepp

comments