···1818pub const MAX_BATCHED_COLLECTIONS: usize = 64; // hard limit, MAX_BATCHED_RECORDS applies per-collection
1919pub const MIN_BATCH_SPAN_SECS: f64 = 2.; // breathe
2020pub const MAX_BATCH_SPAN_SECS: f64 = 60.; // hard limit, pause consumer if we're unable to send by now
2121-pub const SEND_TIMEOUT_S: f64 = 15.; // if the channel is blocked longer than this, something is probably up
2222-pub const BATCH_QUEUE_SIZE: usize = 1; // nearly-rendez-vous
2121+pub const SEND_TIMEOUT_S: f64 = 150.; // if the channel is blocked longer than this, something is probably up
2222+pub const BATCH_QUEUE_SIZE: usize = 64; // used to be 1, but sometimes inserts are just really slow????????
23232424pub type LimitedBatch = EventBatch<MAX_BATCHED_RECORDS>;
2525
+2-2
ufos/src/storage.rs
···4343 let mut concerned = false;
4444 loop {
4545 tokio::select! {
4646- _ = tokio::time::sleep(Duration::from_secs_f64(1.)) => {
4646+ _ = 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 {
5252- log::warn!("finally inserted slow event batch after {:?}", started.elapsed());
5252+ log::warn!("finally inserted slow event batch (or failed) after {:?}", started.elapsed());
5353 }
5454 break
5555 }