Try to avoid the metrics endpoint timing out
This commit is contained in:
parent
40212ea053
commit
3f16f59d97
2 changed files with 14 additions and 7 deletions
|
|
@ -252,7 +252,8 @@
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(with-statement-timeout
|
(with-statement-timeout
|
||||||
conn
|
conn
|
||||||
fetch-high-level-table-size-metrics))))
|
fetch-high-level-table-size-metrics))
|
||||||
|
#:timeout 3))
|
||||||
#:unwind? #t))
|
#:unwind? #t))
|
||||||
(guix-revisions-count
|
(guix-revisions-count
|
||||||
(with-exception-handler
|
(with-exception-handler
|
||||||
|
|
@ -268,7 +269,8 @@
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(with-statement-timeout
|
(with-statement-timeout
|
||||||
conn
|
conn
|
||||||
count-guix-revisions))))
|
count-guix-revisions))
|
||||||
|
#:timeout 3))
|
||||||
#:unwind? #t))
|
#:unwind? #t))
|
||||||
(pg-stat-user-tables-metrics
|
(pg-stat-user-tables-metrics
|
||||||
(with-exception-handler
|
(with-exception-handler
|
||||||
|
|
@ -284,7 +286,8 @@
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(with-statement-timeout
|
(with-statement-timeout
|
||||||
conn
|
conn
|
||||||
fetch-pg-stat-user-tables-metrics))))
|
fetch-pg-stat-user-tables-metrics))
|
||||||
|
#:timeout 3))
|
||||||
#:unwind? #t))
|
#:unwind? #t))
|
||||||
(pg-stat-user-indexes-metrics
|
(pg-stat-user-indexes-metrics
|
||||||
(with-exception-handler
|
(with-exception-handler
|
||||||
|
|
@ -300,7 +303,8 @@
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(with-statement-timeout
|
(with-statement-timeout
|
||||||
conn
|
conn
|
||||||
fetch-pg-stat-user-indexes-metrics))))
|
fetch-pg-stat-user-indexes-metrics))
|
||||||
|
#:timeout 3))
|
||||||
#:unwind? #t))
|
#:unwind? #t))
|
||||||
(pg-stats-metric-values
|
(pg-stats-metric-values
|
||||||
(with-exception-handler
|
(with-exception-handler
|
||||||
|
|
@ -316,7 +320,8 @@
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(with-statement-timeout
|
(with-statement-timeout
|
||||||
conn
|
conn
|
||||||
fetch-pg-stats-metrics))))
|
fetch-pg-stats-metrics))
|
||||||
|
#:timeout 3))
|
||||||
#:unwind? #t))
|
#:unwind? #t))
|
||||||
(load-new-guix-revision-job-metrics
|
(load-new-guix-revision-job-metrics
|
||||||
(with-exception-handler
|
(with-exception-handler
|
||||||
|
|
@ -332,10 +337,11 @@
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(with-statement-timeout
|
(with-statement-timeout
|
||||||
conn
|
conn
|
||||||
select-load-new-guix-revision-job-metrics))))
|
select-load-new-guix-revision-job-metrics))
|
||||||
|
#:timeout 3))
|
||||||
#:unwind? #t)))
|
#:unwind? #t)))
|
||||||
|
|
||||||
(for-each
|
(fibers-for-each
|
||||||
(match-lambda
|
(match-lambda
|
||||||
((name . pool)
|
((name . pool)
|
||||||
(for-each
|
(for-each
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,7 @@ port. Also, the port used can be changed by passing the --port option.\n"
|
||||||
#:destructor
|
#:destructor
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(close-postgresql-connection conn "web-reserved"))
|
(close-postgresql-connection conn "web-reserved"))
|
||||||
|
#:default-max-waiters postgresql-connections
|
||||||
#:default-checkout-timeout 6
|
#:default-checkout-timeout 6
|
||||||
#:scheduler priority-scheduler)))
|
#:scheduler priority-scheduler)))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue