Inngest Replication
Hey i've been setting up logical replication and using the Neon replication integration with Inngest.
It looks like it works after setting it up, then it suddenly disables itself?
Am currently on the free plan, and can see the inngest role within the table, but its set to active = false when looking at
pg_replication_slots9 Replies
fair-rose•14mo ago
Hey Ollie. I'm glad to hear you're using the integration. I think this is caused by your free plan DB scaling to zero after 5 minutes with no active queries. If you upgrade to launch ($19/month) you can disable scale to zero and prevent that.
You might be able to come up with a workaround on the free plan. I will ask
rival-blackOP•14mo ago
Hey @andyhats i suspected that might be the case. The only thing l saw was that l maintained active connections / queries to my database, and when testing the replication, it suddenly stopped sending events and went inactive.
fair-rose•14mo ago
@bryan mentioned to me that there might be a tweak that Inngest can make to have the replication slot keep the database alive. We will keep you posted
other-emerald•14mo ago
I'm working with the inngest team to determine if there's a bug here. Active connections should prevent auto-suspend and continue sending events. When Neon has detected 75 min of no "ack" (
flush_lsn) of logical replication it will remove the slot as the WAL files are building up on storage causing bloat.
The flush_lsn ack timeout is 75 mins because the snapshot files are produced with more or less fixed frequency - once per 15 seconds. Neon limits the number of files to 300 (neon.logical_replication_max_snap_files=300) which corresponds to 75 minutes.rival-blackOP•14mo ago
Thanks for the update @bryan , i have noticed that it stops when connections are active, but am just not sure if it was down to me being on the free plan or not.
deep-jade•14mo ago
I have the same issue. Would love a fix on this.
other-emerald•14mo ago
still working on a fix, haven't figured out the issue quite yet
deep-jade•13mo ago
any update on this?
other-emerald•13mo ago
oh, yes. this has been fixed.