一次WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK

liiinuuux發表於2014-01-28
alert報錯資訊:
>>> WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK! pid=57
System State dumped to trace file /opt/app/oracle/product/10.2.0/db_1/admin/ XXXXXX/bdump/XXXXXXX2_j001_16704.trc

報錯的是 j001程式,是一個後臺job程式。

當時執行的是 8938job ,根據scheduler$_job資料字典確認,該 job用來收集資料庫統計資訊。
Job Slave State Object
Slave ID: 1, Job ID: 8938
----------------------------------------
SO: 0xcd78567b0, type: 4, owner: 0xcd4553530, flag: INIT/-/-/0x00
(session) sid: 2969 trans: (nil), creator: 0xcd4553530, flag: (48110041) USR/- BSY/-/-/-/-/-
DID: 0002-0039-00000C4A, short-term DID: 0002-0039-00000C4B
txn branch: (nil)
oct: 3, prv: 0, sql: 0xcde99cc10, psql: 0xcd8a1f068, user: 0/SYS
service name: SYS$USERS
O/S info: user: oracle, term: UNKNOWN, ospid: 16704, machine: XXXXXX2
program: oracle@XXXXXX2 (J001)
application name: DBMS_SCHEDULER, hash value=2478762354
action name: GATHER_STATS_JOB, hash value=930355498

job執行期間:
大量等待16 rowcachedc_histogram_defs
申請3級(行級排它鎖 SX
反覆超時(3 秒),最後報 “WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK”
[3 samples,                                          23:34:45 - 23:34:47]
  waited for 'row cache lock', seq_num: 8470
    p1: 'cache id'= 0x10   (16號)
    p2: 'mode'=0x0
    p3: 'request'= 0x3
    time_waited: 2.930612 sec (sample interval: 2 sec)
[3 samples,                                          23:34:42 - 23:34:44]
  waited for 'row cache lock', seq_num: 8467
    p1: 'cache id'= 0x10
    p2: 'mode'=0x0
    p3: 'request'= 0x3
    time_waited: 2.931427 sec (sample interval: 2 sec)


很可能是本節點或另一個節點長時間使用柱狀圖(如硬解析)或執行 DDL(清算期間需要對大量表進行併發truncate)導致。
由於業務高峰發生在晚間清算,因此建議將JOB改到白天或清算前執行。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26239116/viewspace-1076276/,如需轉載,請註明出處,否則將追究法律責任。

相關文章