Increase timeout and cache_size

This commit is contained in:
Nick Mowen 2023-06-06 08:02:05 -06:00
parent 007d65cf0e
commit bfbe99bc65
2 changed files with 10 additions and 2 deletions

View File

@ -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 # NOTE: all db accessing processes need to be created before the db can be bound to the main process
self.db = SqliteQueueDatabase( self.db = SqliteQueueDatabase(
self.config.database.path, 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] models = [Event, Recordings, Timeline]
self.db.bind(models) self.db.bind(models)

View File

@ -39,7 +39,11 @@ def manage_recordings(
db = SqliteQueueDatabase( db = SqliteQueueDatabase(
config.database.path, 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] models = [Event, Recordings, Timeline]
db.bind(models) db.bind(models)