sql azure连接池配置和设置

时间:2017-05-29 19:15:36

标签: azure tomcat java-ee azure-sql-database

我目前正在使用JMeter测试Web应用程序,并发现在某些情况下,在高负载下,某些HTTP请求挂起而没有收到响应。这让我觉得连接池已经用尽了。

如何查看正在使用的当前SQL Azure设置?我该如何配置池大小?

我查看了文档,但没有看到如何做到这一点。我的连接在context.xml中设置如下:

<Resource name="jdbc/sqlazure"
auth="Container"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
type="javax.sql.DataSource"
maxIdle="30"

以下是我的jdbc连接网址

中指定的选项
database
encrypt
trustServerCertificate
hostNameInCertificate
removeAbandonedTimeout
logAbandoned

根据我的JMeter配置,我看到失败的请求如下:

Response code: Non HTTP response code: java.net.SocketException
Response message: Non HTTP response message: Socket closed

任何帮助表示感谢。

1 个答案:

答案 0 :(得分:0)

从Azure SQL JDBC选项卡中复制数据库连接字符串在Azure门户中。 Exmple of JDBC connection string