Under high concurrency (100+ users), shared_db write contention causes database is locked errors in the unguarded post-scrape block. These were surfacing as 500s because there was no exception handler after line 663. Now catches OperationalError and returns raw listings with empty trust scores/sellers (degraded mode) instead of crashing. The SSE queue entry is cleaned up on this path so no orphaned queue accumulates. Root cause: shared_db (sellers, market_comps) is SQLite; at 100 concurrent writers the WAL write queue exceeds the 30s busy timeout. Long-term fix is migrating shared state to Postgres (see snipe#NN). Refs: infra#12 load test Phase 2 spike findings |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| cloud_session.py | ||
| ebay_webhook.py | ||
| main.py | ||