Skip to content

Commit 7c91ea3

Browse files
Set isolation level to read uncommitted for stats updates to reduce lock contention and deadlocks
1 parent d7c11dd commit 7c91ea3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/zmstats.pl.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Info('Stats Daemon starting in '.START_DELAY.' seconds');
4343
sleep(START_DELAY);
4444

4545
my $dbh = zmDbConnect();
46+
$dbh->do('SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED');
47+
4648
my $server = new ZoneMinder::Server($Config{ZM_SERVER_ID});
4749

4850
while (!$zm_terminate) {

0 commit comments

Comments
 (0)