ES /docs

CreateCaptureIntelligenceJob#run | error: Mysql2::Error::TimeoutError: Lock wait timeout exceeded; t

Service
cupixworks-worker
Occurrences
1
Status
Reported
Confidence
85%
Actionability
36%
Cluster ID
fe60a994-a525-4cb2-9057-a0a7faad30ac
First Seen
2026-08-04 19:56 UTC
Last Seen
2026-08-04 19:56 UTC
Actions

CreateCaptureIntelligenceJob#run | error: Mysql2::Error::TimeoutError: Lock wait timeout exceeded; t

What Happened#

2026-08-05 04:56 KST, production cupixworks-worker (tesla)에서 editing publish 후속 처리 중 CreateCaptureIntelligenceJob#runMysql2::Error::TimeoutError: Lock wait timeout exceeded로 1건 실패했다. Capture 748910의 editing 확정(editing_ready→editing_done) 이후 같은 captures row 748910 을 여러 worker/API 경로가 동시에 갱신하는 상황에서, job 의 queued_summary_state 상태 전이 UPDATE 가 InnoDB row lock 을 약 52초 대기하다 timeout 되었다. 에러는 rescue로 포착되어 job 은 false를 반환했고 프로세스 crash 는 없었으나, 해당 Capture 의 summary_statequeued로 전이되지 못하는 기능적 누락이 남는다. 여기서 spacetime 1523661 은 lock 을 잡힌 row 가 아니라 Capture 가 속한 상위 그룹(captures.spacetime_id FK)이자 agent 로 전달되는 참조값이다 (아래 "spacetime 이 왜 엮이는가" 참조).

Quick Facts#

Field Value
exception.class Mysql2::Error::TimeoutError (=ActiveRecord::LockWaitTimeout 하위)
exception.message Lock wait timeout exceeded; try restarting transaction
top_frame app/jobs/create_capture_intelligence_job.rb:29 (self.jobable.queued_summary_state)
runtime Ruby on Rails (tesla), Sidekiq worker
deploy production-us-west-2-20260804T0616Z0-c1c2bbd4-cupixworks
env production, us-west-2

Affected Teams#

Team / Domain Error Count Impact
cupixworks-worker (tenant cupix) 1 Capture 748910 의 capture intelligence 큐잉 상태 전이 실패 (SQS 메시지는 이미 전송됨)
cupixworks-api (동일 Capture) 2× [502] 같은 lock 경합으로 PUT /api/v1/captures/748910/meta/prop 등이 502 로 실패 (04:56–04:57 KST)

Timeline#

  1. 2026-08-05 04:54:08 KST — editing_entity 1983936 (editing_id 1348459) 상태 ready→done, Capture 748910 editing_ready→editing_done (req b1c4986df503a12235690b83)
  2. 2026-08-05 04:54:14–16 KSTafter_done_editing_state 후속 처리: run_3d_reconstruction (job 1252197), CaptureInvoker#create_3d_reconstruction
  3. 2026-08-05 04:54:18–20 KSTrun_analysis 트리거, 별도 worker AnalyzePanoWorker#perform on 748910 (req 33bb84da...) 동시 시작
  4. 2026-08-05 04:54:22 KSTCaptureInvoker#create_capture_intelligence job 1252198 생성, Capture#run_capture_intelligence 실행
  5. 2026-08-05 04:55:02 KST — 또 다른 경로 Capture#update_associated_sitetracks (req 0e01edd1...) 및 #update_associated_deviations (req c2ce467b...) 가 같은 Capture 748910 갱신
  6. 2026-08-05 04:55:18 KSTCreateCaptureIntelligenceJob#send_message SQS FIFO 전송 완료 (spacetime_id 1523661)
  7. 2026-08-05 04:56:10 KSTCreateCaptureIntelligenceJob#runqueued_summary_state UPDATE 가 lock 대기 ~52초 후 Lock wait timeoutrescue → job false 반환
  8. 2026-08-05 04:56:11 / 04:57:03 KST — 같은 Capture 에 대한 API PUT /captures/748910/meta/prop [502] (동일 경합)
  9. 2026-08-05 04:57:30–32 KST — 경합 해소, 이후 PUT /captures/748910 [200] 정상화

Scoring#

Confidence 85% · Actionability 36%

Confidence#

Dimension Score Detail
Evidence completeness 5/5 40 code refs, 7 log queries
Code path explicitness 3/3 40 file:line refs
Log evidence 2/3 section, query
RCA structure 3/3 3/3 sections
Revision history 1/3 1 revision(s)
Agent execution 3/3 success

Actionability#

Dimension Score Detail
Fix complexity 1/5 critical
Affected files 1/5 25 file(s)
Single repo 1/3 4 service(s)
Immediate actions 0/3 absent
Testability 0/3 no test info
External dependency 3/3 no external deps
Data migration 3/3 no migration