← All incidents

[Eval][v3][zh] Third-party payment gateway timeouts cascade into checkout outage

service: checkout-svccreated: 6/2/2026, 11:59:57 PM

Raw incident context

Time: 18:40 UTC. checkout-svc starts returning HTTP 504 to ~78% of checkout attempts.

Symptoms:
- p99 latency: 28s (hitting our 30s gateway timeout)
- Success rate: 22% (down from 99.5%)
- Thread pool utilization: 100% (all 200 worker threads blocked)
- Inbound queue depth: 4200 requests (queue limit 5000)

Downstream calls (from APM):
- Stripe Connect API (/v1/payment_intents): p99 jumped from 800ms to 27s
- Stripe status page: "Investigating elevated latency for Connect endpoints in us-east-1" (posted 18:35 UTC)
- All other downstream deps (auth-svc, fraud-svc) normal

Our config:
- Stripe call timeout: 30s (matches inbound)
- No circuit breaker on Stripe client
- No bulkhead — Stripe calls share the main worker thread pool

Customer impact:
- Failed checkouts: ~3000 in 5min
- Estimated lost GMV: $180k (so far)

On-call:
- 18:38 — pager
- 18:41 — confirmed Stripe is the culprit (status page + APM)
- 18:43 — debating: wait it out vs disable Stripe path entirely

Summary

SEV1

checkout-svc 因下游 Stripe Connect API 延迟飙升导致线程池耗尽,78% 的结账请求超时失败,成功率从 99.5% 骤降至 22%,p99 延迟达到 28s。当前已确认 Stripe 状态页面报告 us-east-1 区域 Connect 端点延迟异常,正在等待 Stripe 修复或采取降级措施。

Severity reasoning: 用户结账失败率 > 1%(实际 78%),且持续超过 5 分钟,直接阻断收入路径(GMV 损失约 $180k),符合 SEV1 标准。

deepseek-chat·prompt v3·output: zh·12822ms·2413↑ / 1953↓ tok·$0.00280

Root cause hypotheses

  • highStripe Connect API 在 us-east-1 区域出现延迟飙升,导致 checkout-svc 的 HTTP 调用超时(30s),线程被阻塞等待响应,最终线程池耗尽。

    Evidence: APM 显示 Stripe /v1/payment_intents 的 p99 延迟从 800ms 跳升至 27s;Stripe 状态页面于 18:35 UTC 确认 us-east-1 区域 Connect 端点延迟问题。

  • highcheckout-svc 缺乏对 Stripe 调用的熔断器或隔板机制,导致单个下游故障扩散至整个服务线程池。

    Evidence: 配置中 Stripe 调用超时设为 30s,无熔断器,且 Stripe 调用与主线程池共享,无独立隔板。

  • lowStripe API 调用量突增(如促销活动)导致 Stripe 端限流或过载,但当前无证据支持。

    Evidence: 未观察到 checkout-svc 自身流量异常,且其他下游服务正常,Stripe 状态页面明确指向其自身问题。

Investigation checklist

  1. 确认 Stripe 状态页面最新更新
    curl -s https://status.stripe.com/api/v2/incidents/current.json | jq '.incident'

    Expected: 返回当前 incident 详情,确认 us-east-1 Connect 延迟问题是否仍在进行中

  2. 检查 checkout-svc 线程池和队列深度
    kubectl exec -n prod deploy/checkout-svc -- curl -s localhost:8080/actuator/threadpool | jq '.threadPoolUtilization, .queueDepth'

    Expected: threadPoolUtilization 接近 100%,queueDepth 接近 5000 上限

  3. 查看 Stripe 调用延迟分布
    kubectl logs -n prod -l app=checkout-svc --since=10m | grep 'stripe' | awk '{print $NF}' | sort -n | tail -20

    Expected: 大部分延迟接近 30s 超时值

  4. 验证其他下游服务是否正常
    kubectl exec -n prod deploy/checkout-svc -- curl -s -o /dev/null -w '%{http_code}' http://auth-svc:8080/health

    Expected: 返回 200,确认 auth-svc 正常

  5. 检查是否有其他服务也依赖 Stripe 并受影响
    kubectl logs -n prod -l app=payment-svc --since=10m | grep -c 'stripe.*timeout'

    Expected: 可能也有超时,但数量较少

Mitigation plan

  • 启用 Stripe 调用的熔断器(如 resilience4j),设置失败阈值(例如 50% 请求失败时熔断 30s),并配置隔板(独立线程池)隔离 Stripe 调用。

    Risk: 熔断期间所有 Stripe 支付将立即失败,可能导致用户看到错误提示,但可避免线程池耗尽。

    Rollback: 回滚配置:删除熔断器配置或恢复为无熔断状态。

  • 临时降级:禁用 Stripe 支付路径,仅保留其他支付方式(如 PayPal、信用卡直连),通过 feature flag 或配置中心切换。

    Risk: 部分用户无法使用 Stripe 支付,但可保持结账流程可用。

    Rollback: 重新启用 Stripe 支付路径。

  • 增加 checkout-svc 的线程池大小(例如从 200 增至 400),并调低 Stripe 调用超时(例如从 30s 降至 10s),以缓解当前压力。

    Risk: 增加线程数可能增加内存压力;缩短超时可能导致更多快速失败,但可减少线程阻塞。

    Rollback: 恢复原始线程池大小和超时配置。

Customer impact

约 78% 的结账请求失败,用户看到 HTTP 504 错误或超时提示。过去 5 分钟内约 3000 笔交易失败,估计损失 GMV $180k。Stripe 支付方式不可用,其他支付方式暂未受影响。

Postmortem draft

事后复盘

摘要

[FILL IN] 2025-04-10 18:40 UTC,checkout-svc 因下游 Stripe Connect API 延迟飙升导致线程池耗尽,78% 结账请求失败,持续约 [FILL IN] 分钟。

时间线 (UTC)

  • 18:35 - Stripe 状态页面发布 us-east-1 Connect 延迟问题
  • 18:38 - 收到 pager 告警
  • 18:40 - 成功率降至 22%,p99 延迟 28s
  • 18:41 - 确认 Stripe 为根因
  • 18:43 - 讨论降级方案
  • [FILL IN] - 实施熔断器/降级
  • [FILL IN] - 服务恢复

影响

  • 结账成功率从 99.5% 降至 22%
  • 约 3000 笔交易失败,GMV 损失 $180k
  • 影响持续时间:约 [FILL IN] 分钟

根因

Stripe Connect API 在 us-east-1 区域出现延迟问题,导致 checkout-svc 的 HTTP 调用超时,线程池耗尽。

检测

通过 APM 和 Stripe 状态页面快速定位,但缺乏熔断器导致故障扩散。

响应

  • 18:38 收到告警,18:41 确认根因
  • 讨论降级方案,但未立即执行

做得好的

  • 快速识别 Stripe 为根因
  • 状态页面信息及时

做得不好的

  • 无熔断器/隔板机制
  • 降级决策延迟

行动项

  • [ ] 为 Stripe 调用添加熔断器和隔板 (P0)
  • [ ] 缩短 Stripe 调用超时 (P1)
  • [ ] 制定 Stripe 降级预案 (P1)
  • [ ] 增加线程池监控告警 (P2)

Follow-ups

  • P0为 Stripe 调用添加熔断器和隔板(独立线程池)checkout-svc 服务负责人
  • P1缩短 Stripe 调用超时(例如从 30s 降至 10s)并评估影响checkout-svc 服务负责人
  • P1制定 Stripe 降级预案:当 Stripe 延迟超过阈值时自动切换支付方式平台团队
  • P2增加线程池利用率和队列深度的告警,阈值设为 80%on-call SRE
  • P2与 Stripe 沟通此次 incident 细节,确认是否有预防措施平台团队