Describe the bug
The mempool app's API container repeatedly crashes on startup with FATAL ERROR: ... JavaScript heap out of memory, in a continuous restart loop. The crash consistently occurs while restoring rbfcache.json from disk cache, immediately after the "Restoring rbf data from disk cache" log line.
The file
/home/umbrel/umbrel/app-data/mempool/data/rbfcache.json
Root cause
rbfcache.json entries are pruned 24 hours after eviction from the mempool (see the evict()/cleanup() logic in /backend/package/api/rbf-cache.js). However, during periods of high RBF activity, the file can grow faster than this 24-hour window clears it. I observed it reach 505MB within roughly a day, and regrow ~19MB within an hour after being purged (~450MB/day sustained).
The API container's default heap limit is set via NODE_OPTIONS: '--max-old-space-size=2048' in the app's docker-compose.yml. This means the 2048MB heap can be exceeded purely by RBF cache size during high-activity periods, even on hardware with ample free RAM, since the heap ceiling is fixed and independent of actual system memory available.
Workaround
Currently manually deleting rbfcache.json each time the app stalls. A more durable workaround is editing docker-compose.yml to change:
NODE_OPTIONS: '--max-old-space-size=2048'
to:
NODE_OPTIONS: '--max-old-space-size=4096'
then restarting the container. This raises the ceiling but doesn't address the underlying growth rate, so it may eventually recur during a sufficiently high-activity period.
Questions for maintainers
(a) Is a 24-hour retention window appropriate for high-fee-volatility periods given resource-constrained defaults, or should this be tunable/shorter?
(b) Should the default heap size scale with expected worst-case cache retention rather than steady-state usage?
Environment
- Device: Ecolite Series
- umbrelOS: 1.7.3
- CPU: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
- Memory: 13.5 GB DDR4
- Storage: 1.97 TB NVMe SSD
- Mempool version: 3.3.1
Describe the bug
The mempool app's API container repeatedly crashes on startup with
FATAL ERROR: ... JavaScript heap out of memory, in a continuous restart loop. The crash consistently occurs while restoringrbfcache.jsonfrom disk cache, immediately after the "Restoring rbf data from disk cache" log line.The file
/home/umbrel/umbrel/app-data/mempool/data/rbfcache.jsonRoot cause
rbfcache.jsonentries are pruned 24 hours after eviction from the mempool (see theevict()/cleanup()logic in/backend/package/api/rbf-cache.js). However, during periods of high RBF activity, the file can grow faster than this 24-hour window clears it. I observed it reach 505MB within roughly a day, and regrow ~19MB within an hour after being purged (~450MB/day sustained).The API container's default heap limit is set via
NODE_OPTIONS: '--max-old-space-size=2048'in the app'sdocker-compose.yml. This means the 2048MB heap can be exceeded purely by RBF cache size during high-activity periods, even on hardware with ample free RAM, since the heap ceiling is fixed and independent of actual system memory available.Workaround
Currently manually deleting
rbfcache.jsoneach time the app stalls. A more durable workaround is editingdocker-compose.ymlto change:to:
then restarting the container. This raises the ceiling but doesn't address the underlying growth rate, so it may eventually recur during a sufficiently high-activity period.
Questions for maintainers
(a) Is a 24-hour retention window appropriate for high-fee-volatility periods given resource-constrained defaults, or should this be tunable/shorter?
(b) Should the default heap size scale with expected worst-case cache retention rather than steady-state usage?
Environment