Skip to content

Commit b345084

Browse files
committed
bound the queue
helpfully, jetstream got stuck for a bunch of hours, so there was a lot of firehose to backfill and find out the actual performance limit and how much the queue can grow. the queue grew to millions before the raspi finally ran out of memory and we died with a failed allocation. i bounded it at 100k to let it finish catching up, and that worked. 2048 is still seems fairly arbitrary, but it's not obviously too wildly high or low.
1 parent b4d170e commit b345084

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

link_aggregator/src/consumer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn consume(mut store: impl LinkStorage, qsize: Arc<AtomicU32>, fixture: Opti
4242
thread::spawn(move || consume_jsonl_file(f, sender)),
4343
)
4444
} else {
45-
let (sender, receiver) = flume::unbounded(); // eek
45+
let (sender, receiver) = flume::bounded(2048); // eek
4646
let cursor = store.get_cursor().unwrap();
4747
(
4848
receiver,

0 commit comments

Comments
 (0)