title: Intermittent Read Timeouts to SQL Server DB - com.microsoft.sqlserver.jdbc.SQLServerException: Read timed out
body: <p>I have a software service running via Tomcat which performs some analytics on data from my SQLServer database using the SQLServer JDBC driver. </p>
  
  <p>Around 50% of the time when running SQL queries I receive the error:</p>
  
  <blockquote>
    <p>com.microsoft.sqlserver.jdbc.SQLServerException: Read timed out</p>
  </blockquote>
  
  <p>I have set my connectiontimeout property in the connection strings that the software uses to connect to my database. I have also set the connection timeout within the software itself in the settings. This has no effect on the error, I set connection timeout to 120 seconds and it still throws a readtimeout within 30.</p>
  
  <p>The intermittent nature of the timeouts is very strange. I'll get this error for a few minutes, and then it will work for a few minutes, refreshing easily.</p>
  
  <p>Is anyone familiar with the error? Are there any more settings I could set in the connection string to try and resolve the readtimeout as it seems to be a different thing to connectiontimeout.</p>