Open EtaoinWu opened 3 weeks ago
In just a matter of two weeks, with personal usage, wal file is now 63MB from a fresh install.
A workaround to recover diskspace and write the content of the WAL back to the main database:
$ sudo systemctl stop headscale
$ sudo -u headscale -i
$ sqlite3 /path/to/headscale/db.sqlite VACUUM
$ sudo systemctl start headscale
Is this a support request?
Is there an existing issue for this?
Current Behavior
I have a ~20 node tailnet running and my sqlite database is around 500KB. After running it for several months, I realized that it's almost occupying 1GB of disk space now. Upon inspection, I found that my
db.sqlite-wal
is growing at a steady 500KB/hour, which equals >4GB/year. Headscale never performs any checkpointing operation, and itswal_autocheckpoint
was set to zero here. This lead to the ever-growing WAL file.Expected Behavior
There should be some periodic checkpointing of the sqlite database, either by time or by number of transactions.
Steps To Reproduce
db.sqlite-wal
is hugeEnvironment
Runtime environment
Anything else?
No response