Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Add warning if jobs take too long
Browse files Browse the repository at this point in the history
  • Loading branch information
cevian committed Jul 6, 2021
1 parent dd8b1ed commit 8838af6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/migrations/migration_files_generated.go

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pkg/migrations/sql/idempotent/base.sql
Expand Up @@ -1813,6 +1813,10 @@ BEGIN
IF log_verbose THEN
RAISE LOG 'promscale maintenance: finished in %', clock_timestamp()-startT;
END IF;
IF clock_timestamp()-startT > INTERVAL '12 hours' THEN
RAISE WARNING 'promscale maintenance jobs are taking too long (one run took %)', clock_timestamp()-startT
USING HINT = 'Please consider increasing the number of maintenance jobs using config_maintenance_jobs()';
END IF;
END;
$$ LANGUAGE PLPGSQL;
COMMENT ON PROCEDURE SCHEMA_PROM.execute_maintenance(boolean)
Expand Down

0 comments on commit 8838af6

Please sign in to comment.