RC: 모든 Session이 30초 정도 Latch , Enq Wait 되어 장애 발생 - enq: TX - contention, enq: SQ - contention, latch: MGA shared context latch
(Doc ID 2596037.1)
Last updated on FEBRUARY 11, 2020
Applies to:
Oracle Database - Enterprise Edition - Version 18.4.0.0.0 and laterInformation in this document applies to any platform.
Symptoms
On : 18.4.0.0.0 version, RDBMS
ACTUAL BEHAVIOR
---------------
모든 session이 30초 정도 latch , enq wait 되어 장애 발생
모든 세션이 30초 정도 wait 되어 , 서비스 장애를 발생시킨 상황입니다.
active session history를 체크한 결과
모든 세션에서 latch 나 enq event를 대기하고 있습니다.
EXPECTED BEHAVIOR
-----------------------
.
STEPS
-----------------------
- oltp 트랜잭션이 상당히 빈번한 db임.
- aud$ 테이블에 enq: TX - contention 걸린것을 확인 - active session history 를 통해 확인
- active session 개수 증가
- app에서 거래 time out이 발생했습니다. ( 거래 time out 임계치는 3초로 app에서 셋팅되어 있습니다)
- audit 테이블 조회 -> 세션들이 logoff by clean up 내용으로 audit 되어 있는 것을 확인
- 순차적으로 많은 세션이 빠졌다가 붙고 하는 과정에서 AUD$ 쪽에서 wait됨.
- app로 인입된 거래가 db처리에서 time out 발생되면 app단 프로그램에서 db 커넥션을 close 한 후 다른 커넥션을 가져와 db처리 재시도를 진행함.
그래서 오라클에서는 logoff by clean up 엑션으로 audit 되었던 것으로 확인됨.
- activew 세션들이 aud$ 테이블에 enq: TX - contention 걸린것을 확인
- 타 세션에서도 같이 enq SQ- contention 를 보이면서 거래가 time out 발생
- app서버 내렸다가 올리는 것을 재현시 세션 60개 (커넥션 풀)를 사용하는 app 프로세스 1개를 내렸을 때
db단에서 4개정도의 세션에서 3초정도 latch: MGA shared context latch 가 잡힘.
- 세션을 120개 정도 사용하는 app 프로세스 1개를 내렸을 때 latch: MGA shared context latch 와 buffer busy wait 도 잡힘.
또한 시간과 세션개수가 늘어남.
- 각 세션에서 수행되는 쿼리는 audit dml인 insert into audsys.aud$unified ....
였음.
- 문제시점 바로 전에 app 담당자가 app 프로그램 중 일부를 stop시켰으며
일부 app 프로그램을 stop시켰기 때문에 그 APP프로그램이 사용하는 db 연결된 세션들이 PMON에 의해 CLEAR 되었음.
- 이 세션들이 CLEAR되기 전에 Latch: MGA shared context latch 와 buffer busy wait 이 잡혔고,
이 문제가 다른 세션에도 영향을 준것으로 보임.
BUSINESS IMPACT
-----------------------
.
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |