gpt4 book ai didi

java - WildFly 10.0.0 Final正在接受请求,但将其放入队列中而不进行处理

转载 作者:行者123 更新时间:2023-11-29 17:43:55 24 4
gpt4 key购买 nike

Wildfly正常运行,直到在某个时候停止处理请求并显示以下异常:

2018-04-18 04:57:28,469 ERROR  [stdout] (default task-6) Myconnection: getConnection(): Exception: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/betadata

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/betadata

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:146)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:66)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at MyConnection.getK3Connection(MyConnection.java:165)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at ConnectDb.getNextMarketOpenDate(ConnectDb.java:1511)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at IntradayUpdateInfo.set1MinExpiry(IntradayUpdateInfo.java:460)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at IntradayUpdateInfo.manage1minDatesInfo(IntradayUpdateInfo.java:129)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at HomeServlet.processRequest(HomeServlet.java:351)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at HomeServlet.doPost(HomeServlet.java:1261)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at java.lang.Thread.run(Thread.java:748)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/betadata

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:656)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:429)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:747)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) ... 36 more

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) Caused by: javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (10000 [ms])

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.getConnection(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:564)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:626)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:598)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:626)

2018-04-18 04:57:28,469 ERROR [stderr] (default task-6) ... 39 more


如果wildfly不处理请求,然后关闭wildfly或尝试测试数据源连接,则还将显示上述有关SQL资源的异常。

下图显示了此数据源连接的统计信息。还可以看到池连接已最大化,并且所有连接都处于活动状态。

Pool connections are maxed out and all of them are active too

当我尝试从wildfly管理员控制台测试数据源连接时,它给了我这个错误:

Unexpected HTTP response: 500

Request
{
"address" => [
("subsystem" => "datasources"),
("data-source" => "betadata")
],
"operation" => "test-connection-in-pool"
}

Response

Internal Server Error
{
"outcome" => "failed",
"failure-description" => "WFLYJCA0040: failed to invoke operation: WFLYJCA0047: Connection is not valid",
"rolled-back" => true
}


我不明白是什么导致了Wildfly中此类行为。

我发现只有在关闭并重新启动Wildfly或仅从Wildfly的管理控制台中刷新所有连接(没有其他刷新策略可用)后,该问题才能解决。

enter image description here

注意:默认情况下,My Wildfly使用standalone.xml作为配置。

最佳答案

我确定问题出在您的代码中。首先检查您的代码是否存在连接泄漏。

关于java - WildFly 10.0.0 Final正在接受请求,但将其放入队列中而不进行处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49892634/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com