Skip to content

Commit 04acfef

Browse files
authored
Change replication lag warning threshold from 2 -> 5 minutes. (#312)
1 parent a882b94 commit 04acfef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/service-core/src/api/diagnostics.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ export async function getSyncRulesStatus(
149149
);
150150
const lagSeconds = Math.round((Date.now() - lastTime) / 1000);
151151
// On idle instances, keepalive messages are only persisted every 60 seconds.
152-
// So we use 2 minutes as a threshold for warnings, and 15 minutes for critical.
152+
// So we use 5 minutes as a threshold for warnings, and 15 minutes for critical.
153153
// The replication lag metric should give a more granular value, but that is not available directly
154154
// in the API containers used for diagnostics, and this should give a good enough indication.
155155
if (lagSeconds > 15 * 60) {
156156
errors.push({
157157
level: 'fatal',
158158
message: `No replicated commit in more than ${lagSeconds}s`
159159
});
160-
} else if (lagSeconds > 120) {
160+
} else if (lagSeconds > 5 * 60) {
161161
errors.push({
162162
level: 'warning',
163163
message: `No replicated commit in more than ${lagSeconds}s`

0 commit comments

Comments
 (0)