Skip to content

Commit e1d1e20

Browse files
committed
try not to die for longer
1 parent 4a68dab commit e1d1e20

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ufos/src/consumer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pub const MAX_ACCOUNT_REMOVES: usize = 1024; // hard limit, extremely unlikely t
1818
pub const MAX_BATCHED_COLLECTIONS: usize = 64; // hard limit, MAX_BATCHED_RECORDS applies per-collection
1919
pub const MIN_BATCH_SPAN_SECS: f64 = 2.; // breathe
2020
pub const MAX_BATCH_SPAN_SECS: f64 = 60.; // hard limit, pause consumer if we're unable to send by now
21-
pub const SEND_TIMEOUT_S: f64 = 15.; // if the channel is blocked longer than this, something is probably up
22-
pub const BATCH_QUEUE_SIZE: usize = 1; // nearly-rendez-vous
21+
pub const SEND_TIMEOUT_S: f64 = 150.; // if the channel is blocked longer than this, something is probably up
22+
pub const BATCH_QUEUE_SIZE: usize = 64; // used to be 1, but sometimes inserts are just really slow????????
2323

2424
pub type LimitedBatch = EventBatch<MAX_BATCHED_RECORDS>;
2525

ufos/src/storage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ where
4343
let mut concerned = false;
4444
loop {
4545
tokio::select! {
46-
_ = tokio::time::sleep(Duration::from_secs_f64(1.)) => {
46+
_ = tokio::time::sleep(Duration::from_secs_f64(3.)) => {
4747
log::warn!("taking a long time to insert an event batch ({:?})...", started.elapsed());
4848
concerned = true;
4949
}
5050
_ = cancelled.cancelled() => {
5151
if concerned {
52-
log::warn!("finally inserted slow event batch after {:?}", started.elapsed());
52+
log::warn!("finally inserted slow event batch (or failed) after {:?}", started.elapsed());
5353
}
5454
break
5555
}

0 commit comments

Comments
 (0)