Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit e7cea99

Browse files
pepyakindrahnr
authored andcommitted
Increase preparation timeout (#4270)
* Increase preparation-timeout to 60 seconds * Adapt `pvf_preparation_time` metric to the new value
1 parent 749f6b6 commit e7cea99

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

node/core/pvf/src/metrics.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,21 @@ impl metrics::Metrics for Metrics {
152152
prometheus::Histogram::with_opts(
153153
prometheus::HistogramOpts::new(
154154
"pvf_preparation_time",
155-
"Time spent in preparing PVF artifacts",
155+
"Time spent in preparing PVF artifacts in seconds",
156156
)
157+
.buckets(vec![
158+
// This is synchronized with COMPILATION_TIMEOUT=60s constant found in
159+
// src/prepare/worker.rs
160+
0.1,
161+
0.5,
162+
1.0,
163+
10.0,
164+
20.0,
165+
30.0,
166+
40.0,
167+
50.0,
168+
60.0,
169+
]),
157170
)?,
158171
registry,
159172
)?,

node/core/pvf/src/prepare/worker.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ use std::{sync::Arc, time::Duration};
3535
const NICENESS_BACKGROUND: i32 = 10;
3636
const NICENESS_FOREGROUND: i32 = 0;
3737

38-
const COMPILATION_TIMEOUT: Duration = Duration::from_secs(10);
38+
/// The time period after which the preparation worker is considered unresponsive and will be killed.
39+
// NOTE: If you change this make sure to fix the buckets of `pvf_preparation_time` metric.
40+
const COMPILATION_TIMEOUT: Duration = Duration::from_secs(60);
3941

4042
/// Spawns a new worker with the given program path that acts as the worker and the spawn timeout.
4143
///

0 commit comments

Comments
 (0)