我已经在Apache 7上部署了一个Grails应用程序。上周,由于线程池为空,应用程序出现了故障,但是没有那么多的用户可以做到这一点。当我查看服务器时,我发现端口8080上有很多java线程和tcp进程,它们不是关闭状态CLOSE_WAIT。
该应用程序通过groovy.net.http.RestClient与远程MSSQL数据库以及远程客户关系管理系统进行通信。作为一个网络服务器,我们正在使用Nginx。我查看了所有的日志(tomcat,nginx访问日志),没有发现任何奇怪的活动。有谁在类似的技术上面临过这样的问题吗?
Grails版本为2.3.7
以下是对db的连接设置:
production {
dataSource {
// Production MS SQL database configuration
//pooled = true
driverClassName = "net.sourceforge.jtds.jdbc.Driver"
url = "jdbc:jtds:sqlserver://blahblahblah"
username = "username"
password = "password"
dbCreate = "none"
properties {
// See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
jmxEnabled = true
initialSize = 5
maxActive = 1250
minIdle = 20
maxIdle = 100
maxWait = 15000
maxAge = 10 * 60000
timeBetweenEvictionRunsMillis = 5000
minEvictableIdleTimeMillis = 60000
validationQuery = "SELECT 1"
validationQueryTimeout = 3
validationInterval = 15000
testOnBorrow = true
testWhileIdle = true
testOnReturn = false
jdbcInterceptors = "ConnectionState"
defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_UNCOMMITTED
}
}
}更新
我发现CLOSE_WAIT连接与nginx 499错误客户端关闭请求同时出现。
发布于 2016-03-06 18:45:14
我不再有Grails 2项目了。我从未见过这样的错误。但我通常不使用jtd的司机。这就是我所用的。
driverClassName: "com.mysql.jdbc.Driver"
dialect: "org.hibernate.dialect.MySQL5InnoDBDialect"
url: "jdbc:mysql://localhost/myroject?useUnicode=yes&characterEncoding=UTF-8"我记得以前我必须下载DB驱动程序并将其添加到lib目录中。
https://stackoverflow.com/questions/35814801
复制相似问题