JDBC connection hangs with no response from SQL Server 2008 r2

前端 未结 3 1323
粉色の甜心
粉色の甜心 2020-12-11 06:21

When connecting to SQL Server 2008 (express locally, full server in production) this works fine for me when developing on my local machine, but this thing just hangs in prod

相关标签:
3条回答
  • 2020-12-11 06:51

    You can take a snapshot of your thread stack traces and see where it gets stuck. If its in socket reading - something wrong in db (I think this would be the case here).

    0 讨论(0)
  • 2020-12-11 06:59

    If production is running on Java 6 Update 29, then either upgrade to Java 6 Update 30 or downgrade to Java 6 update 27(?). Update 29 contains a bug where SSL doesn't work correctly and the connection to SQL Server hangs.

    0 讨论(0)
  • 2020-12-11 07:05

    I encountered the same behavior with MS SQL Server 2012 + JDBC 4.0 driver and once again JDK 6.0 update 29 was the problem. The connection hanged on first call to executeQuery() or even with setAutoCommit(false) before any query was issued. After updating to JDK 6.0 update 37 all works fine.

    HTH, Michal

    0 讨论(0)
提交回复
热议问题