PM2 max_memory SIGINT was ending the Prisma/pg pool while archive and
delivery jobs still queried it, flooding "Cannot use a pool after calling
end". Await idle on all loop workers before $disconnect, and raise the
worker memory/kill_timeout so burst indexing does not restart every few
minutes.
Paperclip-Agent: David Santos (urlKey founding-engineer; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-31189
Paperclip-Run: 61448079-9293-4b3b-989d-b5857bf058c1
photoreport-boot.service runs infra/deploy/boot.sh at boot (starts the PM2 apps from the last built code, without depending on a saved PM2 list); tmpfiles rule for TMPDIR; deploys pm2 save; PM2 retries with exponential backoff while the database starts.
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
photoreport-api crashes immediately under node cluster mode on some LXC hosts
(native addons: sharp, @node-rs/argon2) while fork mode runs fine. Default
stays cluster/2 everywhere; a host can opt into fork mode by writing
/etc/photoreport/pm2-api.override.json, outside the repo so deploy.sh never
touches it.
Paperclip-Issue: BIT-31073
Paperclip-Run: f547e267-f300-4ca3-a746-be388d7e38b2