Hello Johan,
We are facing same issue now you found any solution to this if so please share that will be greatful.
Thanks,
Deepa
Hi, just bumping this thread. I recently upgraded a site from 11.20.0 to 11.20.17 (in non-prod only so far) and I'm now seeing this error regularly.
It typically happens when various scheduled jobs start (but not always - it's erratic), - e.g., the link validation job or 'delayed publish job' appear often in the logs:
ERROR EPiServer.DataAbstraction.ScheduledJob: Job EPiServer.LinkAnalyzer.LinkValidationJob failed for the job 'Link Validation' with jobId ='<SOME GUID>'
System.InvalidOperationException: ExecuteReader requires an open and available Connection. The connection's current state is closed.
Just wondering if anyone has further information. I'd rather know if there's an issue before pushing the upgrade to production.
thanks,
Running into very similar errors while running the Search & Navigation Indexing Job on Episerver.Cms v12.22.3. Issue occured our of the blue after doing a database migration from a Cms 11 instance of the project.
EPiServer.Find.Cms.ContentIndexer[0]
An exception occurred while fetching content. ExecuteReader requires an open and available Connection. The connection's current state is open..
Not sure if it's related but I'm currious if anyone found a solution.
My issue turned out to be a bug in Episerver.Framework 12.16.0 / Episerver.Cms 12.22.3. Once I downgraded to 12.22.1 the Search & Navigation Content Indexing Job started to work again. Assuming it has to do with the new Inline Block functionality.
Thank you Sam for contributing.
We are currently working on a fix for this.
This will be fixed with next CMS and Find package
CMS-29569 BackgroundContext should be isolated
https://world.optimizely.com/support/bug-list/bug/CMS-29569
FIND-11746 Background tasks should run in own context
(Bug not made public yet)
CMS-29569 BackgroundContext should be isolated was part of 12.17.1 released yesterday.
I see this in a site I'm analyzing with Application Insights from various stored procedure calls, some examples are netContentListPaged, netContentDataLoad and netContentChildrenReferences.
ExecuteReader requires an open and available Connection. The connection's current state is open.
System.InvalidOperationException:
at System.Data.SqlClient.SqlConnection.GetOpenConnection (System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute (System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Data.SqlClient.SqlCommand.ValidateCommand (System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Data.SqlClient.SqlCommand.RunExecuteReader (System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Data.SqlClient.SqlCommand.RunExecuteReader (System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Data.SqlClient.SqlCommand.ExecuteReader (System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at EPiServer.DataAccess.Internal.ContentLoadDB+<>c__DisplayClass2_0.<Load>b__0 (EPiServer, Version=11.20.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor+<>c__DisplayClass31_0`1.<Execute>b__0 (EPiServer.Data, Version=11.20.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute (EPiServer.Data, Version=11.20.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
at EPiServer.Core.ContentProvider+<>c__DisplayClass127_0.<LoadContentFromCacheOrRepository>b__0 (EPiServer, Version=11.20.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
at EPiServer.Framework.Cache.ObjectInstanceCacheExtensions.ReadThroughWithWait (EPiServer.Framework, Version=11.20.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
at EPiServer.Core.Internal.ContentInstanceCache.ReadThrough (EPiServer, Version=11.20.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
at EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository (EPiServer, Version=11.20.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItem (EPiServer, Version=11.20.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
at EPiServer.Core.Internal.DefaultContentLoader.TryGet (EPiServer, Version=11.20.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
Looking at the code triggering above stacktracke I see a typical contentRepository.TryGet<ImageMedia>(imageReference, out var image) call where ImageMedia is a class that inherits ImageData.
Site is running .NET 4.7.1 and 11.20.3.0 as you can see above.
Any one seen similar and found a solution?