From bfbe99bc65ac2dddcec6af809793fb2cdef8791b Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Tue, 6 Jun 2023 08:02:05 -0600 Subject: [PATCH] Increase timeout and cache_size --- frigate/app.py | 6 +++++- frigate/record/record.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/frigate/app.py b/frigate/app.py index 0ad72630d..fdd1d5242 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -207,7 +207,11 @@ class FrigateApp: # NOTE: all db accessing processes need to be created before the db can be bound to the main process self.db = SqliteQueueDatabase( self.config.database.path, - pragmas={"auto_vacuum": "FULL"}, # Does not defragment database + pragmas={ + "auto_vacuum": "FULL", # Does not defragment database + "cache_size": -512 * 1000, # 512MB of cache + }, + timeout=60, ) models = [Event, Recordings, Timeline] self.db.bind(models) diff --git a/frigate/record/record.py b/frigate/record/record.py index deac65f1a..3870a1b44 100644 --- a/frigate/record/record.py +++ b/frigate/record/record.py @@ -39,7 +39,11 @@ def manage_recordings( db = SqliteQueueDatabase( config.database.path, - pragmas={"auto_vacuum": "FULL"}, # Does not defragment database + pragmas={ + "auto_vacuum": "FULL", # Does not defragment database + "cache_size": -512 * 1000, # 512MB of cache + }, + timeout=60, ) models = [Event, Recordings, Timeline] db.bind(models)