diff --git a/frigate/app.py b/frigate/app.py index 2db8728b2..059bc5ad7 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -205,7 +205,10 @@ class FrigateApp: def bind_database(self) -> None: """Bind db to the main process.""" # 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) + self.db = SqliteQueueDatabase( + self.config.database.path, + pragmas={'auto_vacuum', 'FULL'}, # Does not defragment database + ) models = [Event, Recordings, Timeline] self.db.bind(models)