From b057d3be0de1de61c4a83e3b1d8c247df6240475 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Fri, 30 May 2025 08:10:46 -0400 Subject: add slowQueryThreshold setting to configure slow query warning --- .config/ci.yml | 4 ++++ .config/cypress-devcontainer.yml | 4 ++++ .config/docker_example.yml | 4 ++++ .config/example.yml | 6 ++++-- 4 files changed, 16 insertions(+), 2 deletions(-) (limited to '.config') diff --git a/.config/ci.yml b/.config/ci.yml index 7d5261aacd..a1c8c23b44 100644 --- a/.config/ci.yml +++ b/.config/ci.yml @@ -115,6 +115,10 @@ db: user: postgres pass: ci + # Log a warning to the server console if any query takes longer than this to complete. + # Measured in milliseconds; set to 0 to disable. (default: 300) + slowQueryThreshold: 300 + # If false, then query results will be cached in redis. # If true (default), then queries will not be cached. # This will reduce database load at the cost of increased Redis traffic and risk of bugs and unpredictable behavior. diff --git a/.config/cypress-devcontainer.yml b/.config/cypress-devcontainer.yml index 51f408983c..97f78f3ccc 100644 --- a/.config/cypress-devcontainer.yml +++ b/.config/cypress-devcontainer.yml @@ -57,6 +57,10 @@ db: user: postgres pass: postgres + # Log a warning to the server console if any query takes longer than this to complete. + # Measured in milliseconds; set to 0 to disable. (default: 300) + slowQueryThreshold: 300 + # If false, then query results will be cached in redis. # If true (default), then queries will not be cached. # This will reduce database load at the cost of increased Redis traffic and risk of bugs and unpredictable behavior. diff --git a/.config/docker_example.yml b/.config/docker_example.yml index 1b55eee7f5..051526024e 100644 --- a/.config/docker_example.yml +++ b/.config/docker_example.yml @@ -118,6 +118,10 @@ db: user: example-misskey-user pass: example-misskey-pass + # Log a warning to the server console if any query takes longer than this to complete. + # Measured in milliseconds; set to 0 to disable. (default: 300) + slowQueryThreshold: 300 + # If false, then query results will be cached in redis. # If true (default), then queries will not be cached. # This will reduce database load at the cost of increased Redis traffic and risk of bugs and unpredictable behavior. diff --git a/.config/example.yml b/.config/example.yml index b7843da9ad..7d9b6ceda6 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -121,13 +121,15 @@ db: user: sharkey pass: example-misskey-pass + # Log a warning to the server console if any query takes longer than this to complete. + # Measured in milliseconds; set to 0 to disable. (default: 300) + slowQueryThreshold: 300 + # If false, then query results will be cached in redis. # If true (default), then queries will not be cached. # This will reduce database load at the cost of increased Redis traffic and risk of bugs and unpredictable behavior. #disableCache: false - # - # Extra Connection options #extra: # ssl: true -- cgit v1.2.3-freya