Open mkieselmann opened 1 week ago
Increasing the available heap size for node seems to fix the issue:
ENTRYPOINT ["node", "--max-old-space-size=8192", "service/lib/entry.js"]
Addition
@rkistner pointed out how to set max-old-space-size
:
Configure an env var NODE_OPTIONS=--max-old-space-size=800. This example is for 800mb, but set it to around 80% of available memory
Hi, I'm self-hosting powersync on AWS and connect to a large RDS database with many changes happening at a time. Today I repeatedly ran into the following error:
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Stack trace:
Seems like the service started replication and ran out of memory.
On the database side I see the following query beeing executed:
SELECT * FROM pg_catalog.pg_logical_slot_peek_binary_changes($1, ?, ?, ?, ?, ?, $2)