fasttrackml icon indicating copy to clipboard operation
fasttrackml copied to clipboard

WAL file keeps growing until server is restarted

Open jgiannuzzi opened this issue 2 years ago • 4 comments

We are experiencing checkpoint starvation, as described in https://www.sqlite.org/wal.html#avoiding_excessively_large_wal_files. In combination with #445, this means that a FastTrackML server running on Kubernetes with the SQLite backend will have an ever-growing WAL file and will quickly run into disk space issues!

jgiannuzzi avatar Oct 12 '23 22:10 jgiannuzzi

perhaps starting the server goroutine with a timeout context, which makes it periodically exit -- then do the truncate and restart (in a loop)?

suprjinx avatar Oct 20 '23 17:10 suprjinx

I got a POC running that simply tunes the connection pools so that we don't keep idle connections constantly open and this works fine — however I want to make sure I understand the potential performance implications of that

jgiannuzzi avatar Oct 20 '23 18:10 jgiannuzzi

perhaps starting the server goroutine with a timeout context, which makes it periodically exit -- then do the truncate and restart (in a loop)?

ohh, it sounds like a NodeJS application :)

dsuhinin avatar Mar 04 '24 15:03 dsuhinin

@jgiannuzzi should we PR your branch?

suprjinx avatar Jun 11 '24 16:06 suprjinx