locked
SQL Azure DB Connection RRS feed

  • Question

  • I am noticing that when establishing connection to SQL Azure DB it takes long time to establish the first connection and then subsequent connections are faster, what could be the cause of this?
    Wednesday, March 18, 2015 4:40 PM

Answers

  • This is because the client library (SqlClient, ODBC, JDBC, for example) keeps a connection pool underneath.  Basically, the first connection takes more time because goes through the whole aspects of the connection.  Once released by the application, it is kept alive in the background and next time there is a connection attempt, this connection is re-used.

    Please, let me know if you have more questions.

    Thanks

    Luiz Santos

    Wednesday, March 18, 2015 6:23 PM

All replies

  • This is because the client library (SqlClient, ODBC, JDBC, for example) keeps a connection pool underneath.  Basically, the first connection takes more time because goes through the whole aspects of the connection.  Once released by the application, it is kept alive in the background and next time there is a connection attempt, this connection is re-used.

    Please, let me know if you have more questions.

    Thanks

    Luiz Santos

    Wednesday, March 18, 2015 6:23 PM
  • Thanks for detailed explanation, the problem we are seeing in our Azure DB is that we get timeout first time we try to access database. Then the subsequent connections are successful, any suggestions as to what maybe causing it and how can we fix it?


    • Edited by varsh83 Friday, March 20, 2015 6:39 PM
    Friday, March 20, 2015 6:39 PM