I have a Windows Service(c#) that receives data and inserts it into DB using Entity Framework 6. Database is SQL Server 2014 Enterprise Edition. Both (Service and DB) are hosted on VPS( Windows Server 2008 R2 with 4 GB RAM). The load on the server and service is too low, approx 60 records per minute.

Now intermittently I get the below error in Logs:

Exception: The underlying provider failed on Open.

Inner Exception: System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=0; handshake=7145; [Login] initialization=0; authentication=0; [Post-Login] complete=7387; ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out connection)

Any help regarding fixing this shall be greatly appreciated.


When I digged into the SQL server logs I found the below entry whenever I get the error.

Date 05-12-2014 00:28:24 Log SQL Server (Archive #1 - 05-12-2014 14:10:00)

Source spid57

Message Starting up database 'ReportServerTempDB'.

Has that got anything to do with the Issues?

  • 1
    I would start looking into the connectivity ring buffer. See here for guidance: johnsansom.com/… Post relevant informantion found in the ring buffer. Dec 5, 2014 at 9:19
  • Thanks @spaghettidba. I read the article. But it didn't help. Dec 5, 2014 at 9:59
  • No useful information in the ring buffer? I find it hard to believe. You should be able to tell what is happening. Wild guess: is autoclose enabled in that database? Dec 5, 2014 at 10:13
  • @spaghettidba Auto Close is set to false. May be the ring buffer can provide useful information. But I've no idea how to analyze the results of the two queries posted in link. Please guide. Dec 5, 2014 at 10:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.