我们的平台是:
运行在
IBM Power Linux Power 7与
红帽RHEL 6.9(圣地亚哥)
问题是:有时某些请求会有点“挂起”,因为它们似乎什么都不做,但它们仍然连接了几个小时(如果以前没有强制连接的话),并且在强制关闭这些请求之前,不会释放导致批处理作业永远无法完成的线程。
没有任何类型的锁(锁超时或死锁)。
db2top locks screen
java - DB2查询似乎挂起-LMLPHP
这些图片显示了可能来自dbvisualizer的复杂查询,但有时查询只是“从sysdummy1中选择当前模式”;但从未完成。
连接到数据库的应用程序是websphere application server(was)8.5和dbvis(dbvisualizer)。这两种情况都会出现问题,但dbvis的情况更常见。
应用程序处于UOW等待状态,也就是说,它应该在上一个工作完成后等待工作。
另一方面,我没有解释这种连接是如何导致批处理作业永远无法完成的,因为这正是我不知道并希望知道的。
换句话说:“uow waiting”状态应用程序当前除了等待什么也不做,显示一个未完成的查询正在运行,这是一个悖论。
在这里您还可以看到uow completion status is committed,据我所知,此应用句柄没有挂起的提交。

Application Snapshot
Application handle                         = 47954
Application status                         = UOW Waiting
Status change time                         = 10/29/2018 09:40:02.391805
Application code page                      = 1208
Application country/region code            = 0
Application name                           = dbvis
Connection request start timestamp         = 10/29/2018 09:38:33.022561
Connect request completion timestamp       = 10/29/2018 09:38:33.023248
Application idle time                      = 6 minutes 14 seconds
Previous UOW completion timestamp          = 10/29/2018 09:40:02.079211
Elapsed time of last completed uow (sec.ms)= 0.001282
UOW start timestamp                        = 10/29/2018 09:40:02.390511
UOW stop timestamp                         = 10/29/2018 09:40:02.391793
UOW completion status                      = Committed - Commit Statement
Workspace Information
Most recent operation                      = Static Commit
Most recent operation start timestamp      = 10/29/2018 09:40:02.391735
Most recent operation stop timestamp       = 10/29/2018 09:40:02.391793
Statement type                             = Static SQL Statement
Statement                                  = Static Commit
Statement start timestamp                  = 10/29/2018 09:40:02.391735
Statement stop timestamp                   = 10/29/2018 09:40:02.391793
Blocking cursor                            = NO

Statement type                             = Dynamic SQL Statement
Statement                                  = Fetch
Section number                             = 163
Cursor name                                = COL_DYNH
Statement start timestamp                  = 10/29/2018 09:39:57.544068
Statement stop timestamp                   = 10/29/2018 09:39:57.545429
Blocking cursor                            = YES

最佳答案

dbvis是否处于自动提交模式?
https://www.ibm.com/developerworks/community/blogs/IMSupport/entry/In_DB2LUW_why_a_session_with_status_UOW_Waiting_holding_locks_and_log_space?lang=en

10-06 06:54