# Warning "sqlite without WAL...." and cannot update community blocklist

**URL:** <https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042>\
**Category:** crowdsec\
**Created:** [November 24, 2022, 6:58pm UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042 "2022-11-24T18:58:21Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![vandt-WZ](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/vandt-wz/32/478_2.png) [@vandt-WZ](https://discourse.crowdsec.net/u/vandt-WZ)\
**Post date:** [November 24, 2022, 6:58pm UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/1 "2022-11-24T18:58:21Z")

</div>

Hi Team Crowdsec,

I upgraded version from 1.3.8 → 1.4.2. I restart crowdsec and see warning. How can i fix it ?  
_I new user so i cant attach image to topic 🥲_

crowdsec[89142]: time=“2022-11-24T23:39:04+07:00” level=warning msg=“You are using sqlite without WAL, this can have a…warning.”  
Nov 24 23:39:04 : time=“2022-11-24T23:39:04+07:00” level=warning msg=“Deprecation warning: the pid\_dir config can be sa…required”  
Nov 24 23:39:05 time=“2022-11-24T23:39:05+07:00” level=warning msg=“You are using sqlite without WAL, this can have a…warning.”  
Nov 24 23:39:05 time=“2022-11-24T23:39:05+07:00” level=warning msg=“Deprecation warning: the pid\_dir config can be sa…required”

**Crowdsec log**  
time=“25-11-2022 01:39:26” level=info msg=“Starting community-blocklist update”  
time=“25-11-2022 01:39:35” level=info msg=“capi/community-blocklist : 0 explicit deletions”  
time=“25-11-2022 01:39:35” level=warning msg=“sqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist”  
time=“25-11-2022 01:39:36” level=info msg=“crowdsecurity/community-blocklist : added 18890 entries, deleted 0 entries (alert:6)”  
time=“25-11-2022 01:43:54” level=info msg=“capi metrics: metrics sent successfully”

**Alerts dont see update community blocklist**

ID │ value │ reason │ country │ as │ decisions │ created\_at │  
├────┼───────────────────┼───────────────────────────────────┼─────────┼─────────────────┼───────────┼─────────────────────────────────────────┤  
│ 5 │ Ip:185.234.75.159 │ crowdsecurity/http-open-proxy │ US │ 7489 HostUS │ ban:1 │ 2022-11-24 17:44:42.761322964 +0000 UTC │  
│ 4 │ Ip:103.131.71.127 │ crowdsecurity/http-bad-user-agent │ VN │ 45899 VNPT Corp │ ban:1 │ 2022-11-24 16:49:39.709134511 +0000 UTC │  
│ 3 │ Ip:103.131.71.147 │ crowdsecurity/http-bad-user-agent │ VN │ 45899 VNPT Corp │ ban:1 │ 2022-11-24 16:49:30.1803368 +0000 UTC │  
│ 2 │ Ip:103.131.71.145 │ crowdsecurity/http-bad-user-agent │ VN │ 45899 VNPT Corp │ ban:1 │ 2022-11-24 16:49:26.169507244 +0000 UTC │  
│ 1 │ Ip:103.131.71.160 │ crowdsecurity/http-bad-user-agent │ VN │ 45899 VNPT Corp │ ban:1 │ 2022-11-24 16:49:22.158959268 +0000 UTC │

---

<div class="post-metadata">

**Author:** ![smu44](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@smu44](https://discourse.crowdsec.net/u/smu44)\
**Post date:** [November 25, 2022, 5:21am UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/2 "2022-11-25T05:21:35Z")

</div>

Hi,

About WAL: you can insert the following line in `/etc/crowdsec/config.yaml`, section `db_config`:

> use\_wal: true

Then restart Crowdsec using `systemctl restart crowdsec`.

---

<div class="post-metadata">

**Author:** ![vandt-WZ](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/vandt-wz/32/478_2.png) [@vandt-WZ](https://discourse.crowdsec.net/u/vandt-WZ)\
**Post date:** [November 26, 2022, 3:46am UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/3 "2022-11-26T03:46:13Z")

</div>

Hi Smu44,

Thanks so much. With your guide, my problem’s gone 😆

---

<div class="post-metadata">

**Author:** ![Rhandyx](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/rhandyx/32/493_2.png) [@Rhandyx](https://discourse.crowdsec.net/u/Rhandyx)\
**Post date:** [December 9, 2022, 8:56pm UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/4 "2022-12-09T20:56:51Z")

</div>

> [@smu44](#):
>
> use\_wal: true

i have same issue .Thankyou

---

<div class="post-metadata">

**Author:** ![Ouahibh](https://avatars.discourse-cdn.com/v4/letter/o/2bfe46/32.png) [@Ouahibh](https://discourse.crowdsec.net/u/Ouahibh)\
**Post date:** [May 8, 2023, 8:21am UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/5 "2023-05-08T08:21:55Z")

</div>

Hi,  
I have the same issue in opnsense, how I can set use\_wal:true there.  
Thank you

---

<div class="post-metadata">

**Author:** ![Cyrille37](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@Cyrille37](https://discourse.crowdsec.net/u/Cyrille37)\
**Post date:** [May 8, 2023, 12:49pm UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/6 "2023-05-08T12:49:17Z")

</div>

> [@Warning "sqlite without WAL...." and cannot update community blocklist](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/2):
>
> Hi, About WAL: you can insert the following line in /etc/crowdsec/config.yaml, section db\_config: use\_wal: true Then restart Crowdsec using systemctl restart crowdsec.

---

<div class="post-metadata">

**Author:** ![Ouahibh](https://avatars.discourse-cdn.com/v4/letter/o/2bfe46/32.png) [@Ouahibh](https://discourse.crowdsec.net/u/Ouahibh)\
**Post date:** [May 8, 2023, 1:59pm UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/7 "2023-05-08T13:59:12Z")

</div>

Hi, thankyou.  
Ok, but where I do do this?  
Sincerely I don’t now how to edit the config.yaml file in my installation i.e opnsense

---

<div class="post-metadata">

**Author:** ![iiAmLoz](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/iiamloz/32/386_2.png) [@iiAmLoz](https://discourse.crowdsec.net/u/iiAmLoz)\
**Post date:** [May 9, 2023, 8:39am UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/8 "2023-05-09T08:39:38Z")

</div>

You should be able to ssh into the machine?

---

<div class="post-metadata">

**Author:** ![Ouahibh](https://avatars.discourse-cdn.com/v4/letter/o/2bfe46/32.png) [@Ouahibh](https://discourse.crowdsec.net/u/Ouahibh)\
**Post date:** [May 9, 2023, 4:34pm UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/9 "2023-05-09T16:34:42Z")

</div>

Hi Cyrille37, Hi iiAmLoz, Hi everyone,  
I have test the path with the shell of Opnsense, I don’t found any directory named Crowdsec.

---

<div class="post-metadata">

**Author:** ![Ouahibh](https://avatars.discourse-cdn.com/v4/letter/o/2bfe46/32.png) [@Ouahibh](https://discourse.crowdsec.net/u/Ouahibh)\
**Post date:** [May 10, 2023, 8:44am UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/10 "2023-05-10T08:44:19Z")

</div>

Hi Cyrille37, I looked in /etc in opnsense no trace of Crowdsec.

---

<div class="post-metadata">

**Author:** ![iiAmLoz](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/iiamloz/32/386_2.png) [@iiAmLoz](https://discourse.crowdsec.net/u/iiAmLoz)\
**Post date:** [May 10, 2023, 8:53am UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/11 "2023-05-10T08:53:02Z")

</div>

Opnsense is abit different so it should be

```auto
/usr/local/etc/crowdsec/

```

---

<div class="post-metadata">

**Author:** ![Ouahibh](https://avatars.discourse-cdn.com/v4/letter/o/2bfe46/32.png) [@Ouahibh](https://discourse.crowdsec.net/u/Ouahibh)\
**Post date:** [May 10, 2023, 10:03am UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/12 "2023-05-10T10:03:06Z")

</div>

Hi iiAmLoz,  
Thanks for your assistance, I have edited the config.yaml in /usr/local/etc/crowdsec/ folder, bat I don’t found use\_wal: in the db\_config; section, that’s whay I have added it, I have restarted Crwodsec with the GUI, systemctl restart crowdsec don’t work with my consol.  
Now it returns :  
FATA[10-05-2023 10:51:54] /usr/local/etc/crowdsec/config.yaml: yaml: line 45: did not find expected key

When I try “cscli bouncers list” or "cscli decisions list -a " commands

---

<div class="post-metadata">

**Author:** ![iiAmLoz](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/iiamloz/32/386_2.png) [@iiAmLoz](https://discourse.crowdsec.net/u/iiAmLoz)\
**Post date:** [May 10, 2023, 10:10am UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/13 "2023-05-10T10:10:17Z")

</div>

So the yaml should look like

```yaml
db_config:
  use_wal: true

```

Please note the indentation matters

---

<div class="post-metadata">

**Author:** ![Ouahibh](https://avatars.discourse-cdn.com/v4/letter/o/2bfe46/32.png) [@Ouahibh](https://discourse.crowdsec.net/u/Ouahibh)\
**Post date:** [May 10, 2023, 6:18pm UTC](https://discourse.crowdsec.net/t/warning-sqlite-without-wal-and-cannot-update-community-blocklist/1042/14 "2023-05-10T18:18:38Z")

</div>

Hi iiAmLoz, Hi everyone,

All think is ok, thankyou very much.
