Investigate sudden increase in Zyte usage #192
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported by @kris on 2026-07-04 via chat. A sudden increase in Zyte usage has been observed, requiring investigation to identify the root cause and prevent potential cost or performance issues.
Reported via Mattermost bot by Gambit Agent
Root cause found (design box logs, last 6 min since container restart):
Zyte disabled across the board (both design and Railway production) per explicit request — this is a mitigation, not a fix for the underlying eBay-parser breakage described above.
Design (.env, recreated recontcg_design_api container):
Railway production (runrecon-back, redeployed):
Why EBAY_SCRAPER_PROVIDER and TCGPLAYER_ZYTE_API_KEY needed to change too, not just the live-scrape flag: tcgplayer_client.py's _zyte_api_key() has its own fallback — if no dedicated TCGPLAYER_ZYTE_API_KEY is set, it silently reuses EBAY_SCRAPER_API_KEY whenever EBAY_SCRAPER_PROVIDER=='zyte'. That path is completely independent of EBAY_LIVE_SCRAPE_ENABLED and is on the hot path of ordinary TCGplayer price lookups (card views, catalog, inventory) in production, since production has no TCGPLAYER_PROXY_URL configured to take priority. Flipping only the live-scrape flag would have left this path live. Verified via Railway logs that runrecon-back is Online and serving 200s post-redeploy.
Root cause of the original spike (100% eBay parse failure forcing every request into the pricier browser-render fallback) is still open — didn't spend another Zyte call chasing it further since usage is now fully stopped.
Verified Zyte mitigation across all environments. The serving checkout (recontcg-design) already had Zyte disabled, but Kris, Josh, and Rudy personal dev clones still had EBAY_SCRAPER_PROVIDER=zyte and EBAY_LIVE_SCRAPE_ENABLED/CACHE_REFRESH_ENABLED=true — a ship from any personal clone would have burned Zyte credits. Updated all three .env files to match the serving checkout: provider=direct, live_scrape=false, cache_refresh=false. Railway production was already mitigated via redeploy.