Commit Graph
23 Commits
Author SHA1 Message Date
daprogs b479f92a63 perf: delete purged connections in batches of 5000
The purge ran one DELETE over the whole retention cutoff in a single
transaction, spiking undo/binlog and holding row locks on a table the
fetch cron writes to. Now it loops in batches of 5000 rows with a short
pause between batches, keeping each commit small.
2026-10-18 22:18:08 -04:00
daprogs 4ce1502831 fix: drop duplicate count query; cache upstream version failures
- global_stats() executed the 'last N seconds' COUNT twice per page
  load (prepare()->execute() result was discarded, then re-run)
- fetch_upstream_version() cached nothing on failure, so an
  unreachable git server added a cURL wait (up to 5 s) to every
  dashboard load via the 30 s auto-refresh; failures are now cached
  for 15 minutes and get a 2 s connect timeout
2026-10-18 22:12:18 -04:00
daprogs b0fdd99ad6 perf: batch connection inserts in ingest_connections
Replace one INSERT per event (up to FETCH_LIMIT auto-committed
round trips per node per poll) with multi-row INSERTs in chunks of
200, wrapped in a single transaction per node. Same data, one
commit instead of hundreds, which was making fetch runs slower as
the table grew.
2026-10-18 22:01:03 -04:00
daprogs 849360e61c perf: add occurred_at indexes to connections
Time-window queries (dashboard stats, recent connections, JSON API,
purge) had no usable index and full-scanned the connections table on
every load, so the dashboard slowed down as data accumulated.

- Add idx_occurred (occurred_at) for counts, MAX, ORDER BY ... LIMIT,
  and the purge delete
- Add idx_src_ip_occ (src_ip, occurred_at) so frequent_ips() runs as a
  covering index scan
- Drop the now-redundant standalone idx_src_ip

Migrations in setup.php are idempotent (information_schema checks) and
portable across MySQL 8 and MariaDB.
2026-10-18 21:56:33 -04:00
DAProgs 05e9fbe76e Fix auth bearer 2026-03-16 11:02:43 -04:00
DAProgs 5d4242dcb4 2603.18 - frequenet added since parameter 2026-03-16 10:22:43 -04:00
DAProgs 4281c75631 rolling back 2026-03-16 10:04:24 -04:00
DAProgs f21b21d926 2603.15 - Adding link to ipban 2026-03-15 22:10:46 -04:00
DAProgs 9ab8c6edb0 2603.14 forgot the last connection 2026-03-14 02:04:48 -04:00
DAProgs fc7f1d2f4d 2603.13 cleaning up time display 2026-03-14 01:58:09 -04:00
DAProgs e806c23359 2603.12 fixing dark/light mode 2026-03-13 16:55:00 -04:00
DAProgs 7353fd57db 2603.11 added dark/light mode 2026-03-13 16:30:09 -04:00
DAProgs 9730addb10 2603.10 frequesnt IPs link added 2026-03-13 16:17:37 -04:00
DAProgs 29f20eb15c 2603.9 frequesnt IPs added 2026-03-13 16:13:56 -04:00
DAProgs 1e57388299 2603.8 purging old records 2026-03-13 16:01:19 -04:00
DAProgs 86573769ca rolling top scores 24h 2026-03-11 16:26:39 -04:00
DAProgs 10f51bc4f9 fixing version checking... 2026-03-11 11:18:47 -04:00
DAProgs 73a39f4f3f Adding version checking 2026-03-11 11:08:24 -04:00
DAProgs 0aabf321ef Added connections link to main page 2026-03-11 11:03:30 -04:00
DAProgs 3634f502a1 Adding connections api 2026-03-11 10:57:40 -04:00
DAProgs e0fe0c4d34 Adding passwords and versionning 2026-03-11 10:43:23 -04:00
DAProgs 20ed0eeadb First push 2026-03-11 10:14:26 -04:00
DAProgs eaf4dbbc3b Initial commit 2026-03-11 10:12:23 -04:00