SQL Server: how to troubleshoot login timeout expired error I have a production SQL Server 2012 (SP1) running on Windows Server 2008 R2 Enterprise edition. 

A lot of time while connecting to this server from a remote host I to face connection timed out error. Developers also reported same error from their scripts as well.

Below is the error which I used to get from Management studio:


  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)
  (Microsoft SQL Server, Error: 5)


However this is not so frequent and in next retry I use to connect to database.

From Python Scripts below is the error:


  11/05/2015 10:21:01 AM [ERROR] ('HYT00', '[HYT00] [Microsoft][ODBC SQL
  Server Driver]Login timeout expired (0) (SQLDriverConnect)')
  11/05/2015 10:21:11 AM [ERROR] global name 'traceback' is not defined


Above error is reported a lot of time by the scripts. In the SQL Server error log I didn't find any issue. Is there some issue with the SQL Server driver or with SQL Server?
A lot of time while connecting to this server from a remote host I to face connection timed out error. Developers also reported same error from their scripts as well.

Interestingly, it's not "all the time" which sounds like you can connect "some" of the time. Since this is intermittent it definitely sounds like a name resolution issue. Try registering and connecting to SQL Server with only the SQL Server IP address within SQL Server Studio.  For named instances you can type something like W.X.Y.Z\SQLInstanceName.