Skip to content
Success

Changes

Summary

  1. clicks-writeback: 3x daily, chunked requests, per-chunk watermark (details)
Commit b3c8a26a1000d8bdf657f53d790ca9187566b77d by info
clicks-writeback: 3x daily, chunked requests, per-chunk watermark

The writeback posted ALL changed slugs in one request with a 30 s timeout.
On aktien.news that is ~31k slugs (two Strapi calls each, ~35 min), so the
request always timed out, the watermark was never written and the same
slugs were re-pushed every hour — ~250k click-count writes/day that kept
cms.dotnews.media saturated and surfaced as paas_5xx_tiera CRIT (503 "CMS
unavailable") on 2026-09-18.

- timer: OnCalendar 02:10/10:10/18:10 UTC instead of hourly (click counts
  are "most read" hints, not live data)
- script: send CLICKS_CHUNK (1000) slugs + up to 400 stat paths per request,
  CLICKS_CHUNK_PAUSE_MS (10 s) between chunks, per-chunk timeout 15 min;
  every chunk is watermarked as soon as the app confirms it, a failed chunk
  stops the run and the remainder is retried next time
- stats no longer capped at 400 per run (that cap was per request)
- bootstrap: restart the timer so a changed OnCalendar takes effect

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The file was modifiedbootstrap.sh (diff)
The file was modifiedsql/schema.sql (diff)
The file was modifiedinfra/paas-clicks-writeback.timer (diff)
The file was modifiedbin/paas-clicks-writeback (diff)