# Sqlite and periodic drive activity

**URL:** https://vaultwarden.discourse.group/t/sqlite-and-periodic-drive-activity/466
**Category:** Help
**Created:** [December 13, 2020, 1:56pm UTC](https://vaultwarden.discourse.group/t/sqlite-and-periodic-drive-activity/466 "2020-12-13T13:56:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![blotsome](https://avatars.discourse-cdn.com/v4/letter/b/c77e96/32.png) [@blotsome](https://vaultwarden.discourse.group/u/blotsome)
#### Post date: [December 13, 2020, 1:56pm UTC](https://vaultwarden.discourse.group/t/sqlite-and-periodic-drive-activity/466/1 "2020-12-13T13:56:28Z")

</div>

I’m trying to figure out if this is just normal for sqlite, or a docker issue, or a bitwarden\_rs issue, and if it is adjustable. I pointed the DB directory to a mass storage drive which I’d like to put to sleep whenever not in use. I don’t use bitwarden daily or even weekly some weeks, so I’m fine having the drive sleep for days at a time, to cut down on noise, heat, and energy. However, the drive will not stay asleep. I’m running Ubuntu Server 18.04.5 LTS. Turning on /proc/sys/vm/block\_dump and checking dmesg, I’m seeing  
r2d2-worker-1… dirtied inode … (db.sqlite3) on sdg, followed by block writes. This happens maybe every 5 minutes or so, and I’d rather it not. Any help tracing why the DB updates so frequently when I’m not interacting with BW.

---

<div class="post-metadata">

### Author: ![pianoquintet](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@pianoquintet](https://vaultwarden.discourse.group/u/pianoquintet)
#### Post date: [August 29, 2022, 11:42am UTC](https://vaultwarden.discourse.group/t/sqlite-and-periodic-drive-activity/466/2 "2022-08-29T11:42:39Z")

</div>

I have the exact same issue as highlighted in this post 2 years ago. Could someone kindly provide some feedback? Thank you.

---

<div class="post-metadata">

### Author: ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)
#### Post date: [August 29, 2022, 4:23pm UTC](https://vaultwarden.discourse.group/t/sqlite-and-periodic-drive-activity/466/3 "2022-08-29T16:23:07Z")

</div>

There are multiple items which trigger database activity.  
The alive check for example. There are a few cron/periodic checks which trigger it.

---

<div class="post-metadata">

### Author: ![pianoquintet](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@pianoquintet](https://vaultwarden.discourse.group/u/pianoquintet)
#### Post date: [August 30, 2022, 2:26pm UTC](https://vaultwarden.discourse.group/t/sqlite-and-periodic-drive-activity/466/4 "2022-08-30T14:26:45Z")

</div>

Thank you. Are there options to disable them? I believe many users would like this to be a system that is as static as possible.

---

<div class="post-metadata">

### Author: ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)
#### Post date: [August 30, 2022, 3:29pm UTC](https://vaultwarden.discourse.group/t/sqlite-and-periodic-drive-activity/466/5 "2022-08-30T15:29:46Z")

</div>

I have never seen the question before, besides here.

I’m not sure if you can fully disable it actually. But that mostly depends on your Docker environment and if you can prevent the healthcheck from running.

You can disable the crons/jobs by setting the following env `JOB_POLL_INTERVAL_MS=0`. But that will disable all those jobs, and will disable some notification and cleaning features.

But how to disable the healthcheck, i have no clue. Normally via the docker cli it would be `–no-healthcheck`. That is something you need to check your host system on how to stop those.

---

<div class="post-metadata">

### Author: ![Zotteljedi](https://avatars.discourse-cdn.com/v4/letter/z/cdc98d/32.png) [@Zotteljedi](https://vaultwarden.discourse.group/u/Zotteljedi)
#### Post date: [February 26, 2023, 1:45pm UTC](https://vaultwarden.discourse.group/t/sqlite-and-periodic-drive-activity/466/6 "2023-02-26T13:45:58Z")

</div>

I recently ran into the same problem. In my setup I want to include Vaultwarden in my personal cloud running on a Raspberry Pi 3. Vaultwarden also kept my external USB hard disk from spinning down. I tracked it back to a file called db.sqlite3-wal whose last change timestamp was never older than 5 minutes, even though the file size was always 0.

Turning off WAL by following [Running without WAL enabled · dani-garcia/vaultwarden Wiki · GitHub](https://github.com/dani-garcia/vaultwarden/wiki/Running-without-WAL-enabled) solved the issue for me. At least for an empty vault, I didn’t check with any productive data yet. I also didn’t do any long term observation yet, my setup was just running a backup every 1h and I was pleased to observe that the disk spun down each hour, 30 minutes after the backup took place.

Maybe there is more to fine-tune concerning the periodic services like checking for password leaks, but I think the WAL thing was the first puzzle piece, so I wanted to let you know.
