atproto relay implementation in zig zlay.waow.tech
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: restore 2 MB thread stacks — 1 MB causes stack overflow in subscriber TLS paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

zzstoatzz 7b7c532a 9d75458c

+2 -2
+2 -2
src/main.zig
··· 38 38 39 39 /// zig's default thread stack is 16 MB. with ~2,750 subscriber threads that's 40 40 /// 44 GB of virtual memory. most threads need far less — websocket read loops, 41 - /// CBOR decoding, HTTP handlers. 1 MB is sufficient for all of these. 42 - pub const default_stack_size = 1 * 1024 * 1024; 41 + /// CBOR decoding, HTTP handlers. 2 MB is generous for all of these. 42 + pub const default_stack_size = 2 * 1024 * 1024; 43 43 44 44 var shutdown_flag: std.atomic.Value(bool) = .{ .raw = false }; 45 45