chainweb-node icon indicating copy to clipboard operation
chainweb-node copied to clipboard

Significant increase on the database size (4x the size)

Open b10c77 opened this issue 5 years ago • 3 comments

I'm running a few nodes and noticed that from time to time, the database size goes out of control and grows until it fills the disk.

Right now the size is ~2.1 GB on 2 of my nodes and 8.2 GB on another one. I'm including some screenshots of the sqlite directory which seem to be where the significant size increase happens.

"Normal" size (~2.1 GB) image

Abnormal size (~8.2 GB) image

b10c77 avatar Dec 06 '19 16:12 b10c77

a) what version are you running? b) When you kill chainweb-node, what signal are you sending? The binary likes to be killed with SIGINT -- if you kill with SIGKILL it won't clean up its WAL files.

gregorycollins avatar Jan 06 '20 16:01 gregorycollins

@smartins I looks like the increased storage is due to sqlite WAL file. By default sqlite doesn't release or prune those files during operation or at startup. Did you try to use SIGINT when stopping or restarting nodes? That fixed the issue for us when we tried to reproduce it.

larskuhtz avatar Mar 24 '20 23:03 larskuhtz

If you use systemd you may use the following line in the [Service] section:

KillSignal=SIGINT

larskuhtz avatar Mar 24 '20 23:03 larskuhtz