4

I'm getting lots and lots of System.ComponentModel.Win32Exception, Data.SqlClient.SqlException in my production CM sitecore log. Some times when use content editor or experience editor this error is coming in the browser also. After a refresh I am able to continue.

Sitecore 8.1 Update 2 SQL Azure Paas

Some of the log entries are.

7088 2016:11:24 11:45:09 ERROR Application error.
Exception: System.Data.SqlClient.SqlException
Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)
Source: .Net SqlClient Data Provider
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   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.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Sitecore.Data.DataProviders.Sql.DataProviderCommand..ctor(IDbCommand command, DataProviderTransaction transaction, Boolean openConnection)
   at Sitecore.Data.DataProviders.Sql.SqlDataApi.<>c__DisplayClass4.<CreateCommand>b__3()
   at Sitecore.Data.DataProviders.NullRetryer.Execute[T](Func`1 action, Action recover)
   at Sitecore.Data.DataProviders.Sql.SqlDataApi.<>c__DisplayClass12.<CreateReader>b__10()
   at Sitecore.Data.DataProviders.NullRetryer.Execute[T](Func`1 action, Action recover)
   at Sitecore.Data.DataProviders.Sql.SqlDataApi.CreateReader(String sql, Object[] parameters)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.GetChildIdsByName(String childName, ID parentId)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context)
   at Sitecore.Data.DataProviders.DataProvider.ResolvePath(String itemPath, CallContext context, DataProviderCollection providers)
   at Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.Execute(String , Database )
   at Sitecore.Data.Engines.EngineCommand`2.Execute()
   at Sitecore.Data.Managers.ItemProvider.GetItem(String itemPath, Language language, Version version, Database database, SecurityCheck securityCheck)
   at Sitecore.ContentTesting.Pipelines.ItemProvider.GetItem.GetItemUnderTestProcessor.Process(GetItemArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Data.Managers.PipelineBasedItemProvider.ExecuteAndReturnResult[TArgs,TResult](String pipelineName, String pipelineDomain, Func`1 pipelineArgsCreator, Func`1 fallbackResult)
   at Sitecore.Data.Managers.ItemManager.GetItem(String itemPath, Language language, Version version, Database database, SecurityCheck securityCheck)
   at Sitecore.Data.AliasResolver.get_Item(String alias)
   at Sitecore.Pipelines.HttpRequest.AliasResolver.Process(HttpRequestArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Nexus.Web.HttpModule.(Object , EventArgs )
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: System.ComponentModel.Win32Exception
Message: No such host is known

Another One is

12404 2016:11:24 11:41:53 ERROR Application error.
Exception: System.Data.SqlClient.SqlException
Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Source: .Net SqlClient Data Provider
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   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.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Sitecore.Data.DataProviders.Sql.DataProviderCommand..ctor(IDbCommand command, DataProviderTransaction transaction, Boolean openConnection)
   at Sitecore.Data.DataProviders.Sql.SqlDataApi.<>c__DisplayClass4.<CreateCommand>b__3()
   at Sitecore.Data.DataProviders.NullRetryer.Execute[T](Func`1 action, Action recover)
   at Sitecore.Data.DataProviders.Sql.SqlDataApi.<>c__DisplayClass12.<CreateReader>b__10()
   at Sitecore.Data.DataProviders.NullRetryer.Execute[T](Func`1 action, Action recover)
   at Sitecore.Data.DataProviders.Sql.SqlDataApi.CreateReader(String sql, Object[] parameters)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.GetChildIdsByName(String childName, ID parentId)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context)
   at Sitecore.Data.DataProviders.DataProvider.ResolvePath(String itemPath, CallContext context, DataProviderCollection providers)
   at Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.Execute(String , Database )
   at Sitecore.Data.Engines.EngineCommand`2.Execute()
   at Sitecore.Data.Managers.ItemProvider.GetItem(String itemPath, Language language, Version version, Database database, SecurityCheck securityCheck)
   at Sitecore.ContentTesting.Pipelines.ItemProvider.GetItem.GetItemUnderTestProcessor.Process(GetItemArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Data.Managers.PipelineBasedItemProvider.ExecuteAndReturnResult[TArgs,TResult](String pipelineName, String pipelineDomain, Func`1 pipelineArgsCreator, Func`1 fallbackResult)
   at Sitecore.Data.Managers.ItemManager.GetItem(String itemPath, Language language, Version version, Database database, SecurityCheck securityCheck)
   at Sitecore.Data.AliasResolver.get_Item(String alias)
   at Sitecore.Pipelines.HttpRequest.AliasResolver.Process(HttpRequestArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Nexus.Web.HttpModule.(Object , EventArgs )
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: System.ComponentModel.Win32Exception
Message: The network path was not found

The Snap of error from browser(This happens very rarely). enter image description here enter image description here

  • Make sure you have the <Retrier /> on for SQL Azure – Richard Hauer Nov 24 '16 at 20:00
  • @RichardHauer the <retryer> Setting in Sitecore.config is enabled already. – Jojo Nov 25 '16 at 4:24
  • If it's still unresolved, Could be worth checking whether you have any timeout issues I.e. Database becomes unavailable @ any point it time while accessing the application. Also get the SQL azure connection string in local instances & try to replicate the issue. – Balaji Kuppuswamy Dec 25 '16 at 3:22
1

I have seen SQL Azure Paas having intermittent issues. Check the database from the portal. If the issues persist, raise a support ticket with Microsoft. The last time it happened to me, the database was able to recover itself before the engineer manage to get any actions but was able to confirm the problem and the fact that SQL Azure switched to another instance automatically when it noticed the issue. This point is useful because you can prove (To your boss or client) where the issue was and the fact that it is fixed)

| improve this answer | |
  • adding tcp in connectionString solved one issue "Could not open a connection to SQL Server". Still No Such Host known issue is there – FHN Jan 6 '17 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.