2866f6a318
gates / gates (push) Successful in 27s
- R-732: the first-start geodata import runs up to 9 concurrent 5000-row INSERTs; the database needs ~400 MB anon + ~170 MB touched shared_buffers (the image's FIXED 512MB, not host-RAM sizing). 512M fits only with swap (bench swap 0: 61-104 kills; 9202 swap 512 MiB: survived by swapping). Controls: swap alone, limit alone flip it; shared_buffers 128MB alone does not. Catalog 56c4888: v3.2.4 + 768M, proven with swap off on both venues. audits/immich-first-start-2026-09-30/A-cause.md. - R-730: scripts/iso/build-felhom-iso.sh refuses an uncommitted/untracked/unpushed tree (no bypass), records repo-commit from the gate and iso-v<version>; test iso/test/clean-tree.sh, red-proof run (status check removed -> 2 of 4 cases fail -> restored). - R-731 narrowed (gitea 28.0.0 GA; mariadb 13.0 a short-term Rolling line). R-676 note. - New rows R-733 (bench has no swap, boxes 512 MiB), R-734 (immich .immich markers -> files_may_change). - STATUS: the golden line corrected (no bake is due; 0.283.1 is the newest release). Register 364 -> 366. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
26 lines
1.7 KiB
Bash
Executable File
26 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# pgsample.sh <container> <outfile> [max_s=900] [server=immich-server] — sample a container's cgroup memory every 2 s from
|
|
# the moment it exists (its birth) until <server> is healthy AND the server log shows the geodata import done, or max_s.
|
|
# Columns: t_s current anon file shmem oom oom_kill limit server_health
|
|
C=$1; OUT=$2; MAX=${3:-900}; SRV=${4:-immich-server}
|
|
echo "# pgsample $C from $(date -u +%FT%TZ); host MemTotal $(awk '/MemTotal/{print $2}' /proc/meminfo) kB; cgroup $(stat -fc %T /sys/fs/cgroup)" > $OUT
|
|
until id=$(docker inspect -f '{{.Id}}' $C 2>/dev/null); do sleep 0.5; done
|
|
cg=""; for i in $(seq 1 60); do cg=$(find /sys/fs/cgroup -maxdepth 4 -type d -name "*$id*" 2>/dev/null | head -1); [ -n "$cg" ] && break; sleep 0.5; done
|
|
echo "# id $id cgroup $cg limit $(cat $cg/memory.max)" >> $OUT
|
|
echo "t_s current anon file shmem file_dirty file_writeback oom oom_kill server" >> $OUT
|
|
t0=$(date +%s); done_seen=0
|
|
while :; do
|
|
t=$(( $(date +%s) - t0 ))
|
|
st=$(awk '$1=="anon"{a=$2} $1=="file"{f=$2} $1=="shmem"{s=$2} $1=="file_dirty"{d=$2} $1=="file_writeback"{w=$2} END{print a, f, s, d+0, w+0}' $cg/memory.stat 2>/dev/null)
|
|
ev=$(awk '$1=="oom"{o=$2} $1=="oom_kill"{k=$2} END{print o, k}' $cg/memory.events 2>/dev/null)
|
|
h=$(docker inspect -f '{{.State.Health.Status}}' $SRV 2>/dev/null || echo none)
|
|
echo "$t $(cat $cg/memory.current 2>/dev/null) $st $ev $h" >> $OUT
|
|
if [ "$h" = healthy ] && docker logs $SRV 2>&1 | grep -q 'Geodata import completed'; then done_seen=$((done_seen+1)); fi
|
|
[ $done_seen -ge 15 ] && break
|
|
[ $t -ge $MAX ] && break
|
|
# a replaced container (restart keeps the id; a recreate does not)
|
|
[ -d "$cg" ] || { echo "# cgroup gone at $t s" >> $OUT; break; }
|
|
sleep 2
|
|
done
|
|
echo "# end $(date -u +%FT%TZ)" >> $OUT
|