AppView in a box as a Vite plugin thing hatk.dev
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: restart after backfill to reclaim DuckDB memory

Remove DuckDB memory_limit/threads config (use defaults) and exit
after backfill+FTS completes so the container restarts at baseline ~250MB.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+4 -4
+1 -4
packages/hatk/src/db.ts
··· 123 123 tableSchemas: TableSchema[], 124 124 ddlStatements: string[], 125 125 ): Promise<void> { 126 - instance = await DuckDBInstance.create(dbPath === ':memory:' ? undefined : dbPath, { 127 - memory_limit: '1GB', 128 - threads: '4', 129 - }) 126 + instance = await DuckDBInstance.create(dbPath === ':memory:' ? undefined : dbPath) 130 127 con = await instance.connect() 131 128 readCon = await instance.connect() 132 129
+3
packages/hatk/src/main.ts
··· 191 191 }) 192 192 .then(() => { 193 193 log('[main] FTS indexes ready') 194 + logMemory('after-backfill') 195 + log('[main] Restarting to reclaim memory...') 196 + process.exit(0) 194 197 }) 195 198 .catch((err) => { 196 199 console.error('[main] Backfill error:', err.message)