Websphere 连接问题
我们在 Websphere 6.1 上运行应用程序,并使用 Oracle 10g 数据库。 在过去的几天里,我们注意到日志中存在以下错误 J2CA0045E: 调用资源 jdbc/xxxxx 的 createOrWaitForConnection 方法时,连接不可用。
该应用程序似乎挂起,然后在 20 分钟后自行修复。 我们的连接池当前允许 50 个连接,我们的数据库允许 1200 个会话。
我们无法在我们的 QA 环境中重现这一点。 有谁对我们如何重现这个问题有任何想法,或者对我们如何在生产环境中解决它有任何想法?
谢谢 达米恩
We run our application on Websphere 6.1 and we hit an Oracle 10g database.
Over the last few days we have noticed the following errors in our log
J2CA0045E: Connection not available while invoking method createOrWaitForConnection for resource jdbc/xxxxx.
The app seems to hang and then rectify itself after 20 minutes.
Our connection pool currently allows 50 connections and our database allows 1200 sessions.
We are unable to reproduce this in our QA environment.
Does anyone have any ideas of how we can re-create this problem, or any thoughts on how we can resolve it in our production environment?
Thanks
Damien
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
应用程序是否有可能在一组非常特定的条件下没有正确释放其连接? 例如,也许不在“最后”中这样做? 那么在生产中这种情况比在质量检查中更常见,因为数据和活动不同?
通过使用 TPV 或任何您喜欢的工具监控连接状态,您应该能够看到发生了什么。 我希望看到“孤立”连接在一段时间超时后被清理 - 这将适合您所看到的恢复周期。
通过一些努力,您可以启用足够的 websphere 跟踪来查看连接的分配和释放,并且应该能够看到不匹配的对。
我会对最近部署的任何应用程序进行代码审查。 寻找连接打开并检查合适的“finally”块。
Is it possible that an application is, perhaps under a very particular set of conditions, not correctly releasing its connection? For example, perhaps not doing so in a "finally"? So in prod this happens more often than in QA because the data and activities are different?
By monitoring the status of the connections, using TPV or whatever tool you prefer, you should be able to see what's happening. I'd expect to see the "orphaned" connections being tidied up after some timeout period - that would fit the cycle of recovery you're seeing.
With some effort you could enable enough websphere trace to see allocation and release of connections, and should be able to see mismatched pairs.
I'd code review any recently deployed app. Look for connection opens and check for suitable "finally" blocks.
好吧,如果您无法在 QA 中复制问题,我会开始识别 2 个环境的差异,并在可能的情况下更改 QA 以反映 Prod。 您使用什么服务器? 你能在 WTE 上复制它吗(如果你正在运行一个?)你确定服务器的两个版本是相同的......你说的是 6.1......但仔细看看启动:寻找类似的东西?
************ 开始显示当前环境 ************
WebSphere Platform 6.0 [BASE 6.0.2.5 cf50549.21] 使用进程名称 C001209912Node01Cell\C001209912Node01\server1 和进程 id 8720 运行
确认您有相同的刷新包等?
Well, if you can't replicate the issue in QA, Id start identifying differences the 2 environments, and changing QA to reflect Prod if possible. What server are you using? Can you replicate it on WTE (if you're running one?) are you sure both versions of the server are the same... you said 6.1... but look closer at start up: Look for something like?
************ Start Display Current Environment ************
WebSphere Platform 6.0 [BASE 6.0.2.5 cf50549.21] running with process name C001209912Node01Cell\C001209912Node01\server1 and process id 8720
Confirm you have the same refresh packs and etc?