We are seeing the below error message in SharePoint server event viewer frequently.
"Event ID: 3355 Cannot connect to SQL Server - "ServerName" not found. Additional error information from SQL Server is included below
Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. This failure occurred while attempting to connect to the Failover server. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=2; handshake=1558;[Login] initialization=0; authentication=1; [Post|-Login] complete=10015;"
At the time of the above event viewer error logged, we are seeing below SharePoint hive log.
An error occured while scanning the database, SP2013_Config, for index fragmentation: System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource
1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command) at Microsoft.SharePoint.Administration.Health.DatabasesAreFragmented.Repair() ClientConnectionId:ad765270-1d33-41cc-8331-af8d9c584cec Error Number:-2,State:0,Class:11 Source: .Net SqlClient Data Provider Server: gcmsql03.krys-global.com StackTrace: at onetnative.dll: (sig=1f46c434-d820-4a5c-8550-b0e8d8318fcd|2|onetnative.pdb, offset=28EE2) at onetnative.dll: (offset=15735)
"User Profile Synchronization service" service account has write permissions on all the databases.
What else could cause this errors? Thanks