Deployment logs are accumulated without any size cap in the logs TEXT column of the deployments table. The deploymentLogWriter flushes buffered build output to the database every second via AppendLog, which concatenates to the existing logs string.
A long build (up to the 30-minute buildTimeout) producing continuous output can generate hundreds of MB in a single row.
Impact
SQLite database file grows unboundedly
Large logs values cause slow queries when loading deployment details
AppendLog re-writes the entire logs column on every flush (read + concat + write), so performance degrades quadratically with log size
Memory pressure when scanning deployment rows
Files
internal/models/deployment.go — AppendLog() concatenates without limit
internal/service/deploy/deploy.go — deploymentLogWriter flushes every second
Suggested Fix
Options (not mutually exclusive):
Cap AppendLog at a maximum size (e.g., 1MB) and truncate oldest lines when exceeded
Store logs only on disk (already done via writeLogsToFile) and keep only a tail/summary in the DB
Stream logs from the file instead of the DB column for the UI
## Bug
Deployment logs are accumulated without any size cap in the `logs` TEXT column of the `deployments` table. The `deploymentLogWriter` flushes buffered build output to the database every second via `AppendLog`, which concatenates to the existing logs string.
A long build (up to the 30-minute `buildTimeout`) producing continuous output can generate hundreds of MB in a single row.
## Impact
- SQLite database file grows unboundedly
- Large `logs` values cause slow queries when loading deployment details
- `AppendLog` re-writes the entire logs column on every flush (read + concat + write), so performance degrades quadratically with log size
- Memory pressure when scanning deployment rows
## Files
- `internal/models/deployment.go` — `AppendLog()` concatenates without limit
- `internal/service/deploy/deploy.go` — `deploymentLogWriter` flushes every second
## Suggested Fix
Options (not mutually exclusive):
1. Cap `AppendLog` at a maximum size (e.g., 1MB) and truncate oldest lines when exceeded
2. Store logs only on disk (already done via `writeLogsToFile`) and keep only a tail/summary in the DB
3. Stream logs from the file instead of the DB column for the UI
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Bug
Deployment logs are accumulated without any size cap in the
logsTEXT column of thedeploymentstable. ThedeploymentLogWriterflushes buffered build output to the database every second viaAppendLog, which concatenates to the existing logs string.A long build (up to the 30-minute
buildTimeout) producing continuous output can generate hundreds of MB in a single row.Impact
logsvalues cause slow queries when loading deployment detailsAppendLogre-writes the entire logs column on every flush (read + concat + write), so performance degrades quadratically with log sizeFiles
internal/models/deployment.go—AppendLog()concatenates without limitinternal/service/deploy/deploy.go—deploymentLogWriterflushes every secondSuggested Fix
Options (not mutually exclusive):
AppendLogat a maximum size (e.g., 1MB) and truncate oldest lines when exceededwriteLogsToFile) and keep only a tail/summary in the DB