From 8da9ac761c3c1dcc4e1c2fffa27fa78bbb08a383 Mon Sep 17 00:00:00 2001 From: Ivan Husev Date: Fri, 4 Dec 2026 15:10:15 +0200 Subject: [PATCH 1/7] docs: SECRET_KEY, TRUSTED_PROXIES and MAX_DATABASE_SIZE as the code has them DevFo-OSS/17 --- CLAUDE.md | 4 ++-- docs/configuration.md | 4 ++-- internal/api/logs_ui_test.go | 3 +-- internal/storage/kv/leveldb/leveldb.go | 3 ++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 8c26955..03767c7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -67,7 +67,7 @@ Where to look first: - `fixtures/`: test data for tests only (`WebApp`: a stand-in build of the web app for full-server tests). - `cmd/exceptic/main.go`: loads config, sets the Go soft memory limit unless `GOMEMLIMIT` is set (`config.LimitMemory`: `ContainerMemoryPercent`, 75%, of the smallest memory limit of the process's cgroup and its parents, v2 or v1 (`memory.go`, `MemoryLimitFrom`), else `config.DefaultMemoryLimit`, 200 MiB; logged at start as "memory limit"), opens the store and runs the server of `internal/app`: `app.New` builds it from the settings, with its ingest pipeline and notifier (the tests call it too, and `App.Start` runs the pipeline of a server they serve themselves; `App.WaitStored` waits until what it accepted is stored), `app.Run` starts its pipeline and periodic jobs (`app/jobs.go`, `lanes`, logged at start as "background jobs"; a lane runs its jobs one at a time, lanes side by side; a pass that panics is logged with its stack as a failed pass ("background job failed", `logging.PanicError`) and the lane goes on (a pass that does not stop at its time limit is left running beside the lane, at most one per job; only a compaction can (the inbox compaction, the cleanup compaction, and those the size check and the project purge run), since goleveldb's `CompactRange` takes no ctx; a long pass may return `background.ErrYielded` between its steps once `background.Waiting` (another job of its lane woken or due): the lane runs those, a woken one first, then the pass again), Wakes add at most one waiting pass per job, stopped before the notifier and the store close (a pass that does not stop is waited for one second); `TestJobsStartApart` checks no two start in the same minute over a day, but the minute's `dropped totals`), binds the listener before logging "server started", serves it with `config.MaxConnections` (1000) at once (`server.LimitListener`: more wait in the accept queue, idle keep-alive connections are closed when it is full, again every `fullRetry` (100 ms) while it waits, since one busy at the first try turns idle later, `TestConnectionsTurningIdleMakeRoom`) and `config.MaxHeaderBytes` (64 KiB, 431 above), graceful shutdown on SIGTERM, in order (`run.go`), within `compose.yml`'s `stop_grace_period: 30s` (5 + 15 + 5 s, `TestStopFitsTheGracePeriod`): the HTTP server (`requestsTimeout`, 5 s, for the requests in progress; past it a warning, the connections closed, and the stop goes on and exits 0, `TestStalledUploadDoesNotFailTheStop`), the control socket, the pipeline's drain (`Pipeline.drain`: the queue closed (`CloseInbox`, later envelopes 503 `errStopping`), `Store.EndHolds`, the memory entries not taken written to the inbox collection (`SpillInbox`, stored at the next start); the writer stops at `config.DrainTime`'s deadline (15 s), or at once when the memory entries being stored were not stored by then; after a normal drain the disk entries in flight are still written until the deadline; batches not tried by then are lost, logged once ("envelopes being stored at shutdown lost"), their memory entries counted as dropped busy, their disk entries stored at the next start, `TestWriterStopsAtTheDrainDeadline`, `TestStopWithABacklogIsQuickAndLosesNothing`), the dropped totals (`App.saveDropped`, no timeout: one batch without a sync), the jobs (1 s), the notifier (`closeNotifier`, `notifyTimeout`, 5 s). The `healthcheck` subcommand is what Docker's HEALTHCHECK calls (no curl in a scratch image); `reset-password [email]` (the only admin by default) prints a temporary password, the way to recover a forgotten one (with the server stopped: `docker compose run --rm exceptic reset-password`); `backup [absolute dir]` (default `DATA_DIR/backups/