diff --git a/frigate/app.py b/frigate/app.py index fdd1d5242..845e5ce28 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -209,7 +209,8 @@ class FrigateApp: self.config.database.path, pragmas={ "auto_vacuum": "FULL", # Does not defragment database - "cache_size": -512 * 1000, # 512MB of cache + "cache_size": -512 * 1000, # 512MB of cache, + 'synchronous': 'NORMAL', # Safe when using WAL https://www.sqlite.org/pragma.html#pragma_synchronous }, timeout=60, ) diff --git a/frigate/record/record.py b/frigate/record/record.py index 3870a1b44..8ee8b798b 100644 --- a/frigate/record/record.py +++ b/frigate/record/record.py @@ -42,6 +42,7 @@ def manage_recordings( pragmas={ "auto_vacuum": "FULL", # Does not defragment database "cache_size": -512 * 1000, # 512MB of cache + 'synchronous': 'NORMAL', # Safe when using WAL https://www.sqlite.org/pragma.html#pragma_synchronous }, timeout=60, )