ES /docs

IntegrationRepository race condition — concurrent token refresh lock contention

Service
cupixworks-migration-worker
Occurrences
35
Status
Reported
Confidence
85%
Actionability
32%
Cluster ID
13f89f41-adf3-4e94-951c-17d0b4a05413
First Seen
2026-07-16 00:07 UTC
Last Seen
2026-07-18 16:07 UTC
Actions

IntegrationRepository race condition — concurrent token refresh lock contention

What Happened#

2026-07-16 09:07:20 KST 에 cupixworks-migration-worker 에서 실행되던 Cupix::Cron::Integration.renew_before_expiration cron 이 특정 BIM360 integration 1건에 대해 refresh token 갱신을 시도하다 ARG10060 Refresh access token request is too many 에러로 실패했다. 이 에러는 Redis 기반 per-integration lock (Cache::Integration::{id}::Lock::Key) 획득 실패시 발생하며, 동시에 다른 refresh 요청이 진행 중이라는 신호다. cron 은 rescue 후 next 로 다음 integration 으로 진행했으므로 사용자 영향은 없다.

Quick Facts#

Field Value
exception.class Cupix::Errors::Parameter
exception.message Refresh access token request is too many (code: ARG10060)
top_frame app/repositories/integration_repository.rb:125
deploy production-us-west-2-20260716T0007Z0-f2b18e95-cupixworks
env production, us-west-2
host ip-10-1-144-200.us-west-2.compute.internal

Affected Teams#

Team / Domain Error Count Impact
cupixworks-migration-worker (Integration cron) 1 사용자 영향 없음 — cron 이 rescue 후 다음 integration 으로 진행. 실패한 integration 은 다음 cron 주기(4시간 후)에 재시도된다.

Timeline#

  1. 2026-07-16 09:07:18 KST — cron Cupix::Cron::Integration.renew_before_expiration 시작, refresh_token_due_to_expire 로 만료 임박 candidate 다수를 순회하며 refresh_token 호출 시작
  2. 2026-07-16 09:07:20 KST — 특정 integration 에서 check_refresh_requestsetnx 가 false 반환 → ARG10060 예외 발생, [Cupix::Cron::Integration] failed to renew integration: Refresh access token request is too many 로그 기록
  3. 2026-07-16 09:07:20~23 KST — cron 은 rescue 후 나머지 candidate (integrations 1012, 953, 3218, 3219, 5332, 5353, ...) 계속 처리
  4. 2026-07-16 13:07 KST (예상) — 다음 cron 주기 (7 */4 * * *) 에 동일 integration 재시도 예정

Scoring#

Confidence 85% · Actionability 32%

Confidence#

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

Actionability#

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