hi there rust peeps

does anyone have any clue why a tokio runtime would have a hard cap on the number of tasks at 32,768?

hitting this limit silently fails to spawn new tasks and existing tasks hit "device or resource busy" errors when they need to use IO

no ulimits have been hit as far as i can tell (83 open files, well under limit of 16,384, and all other limits are either unlimited or unrelated to this issue)

given the failure mode is completely silent i have no clue where to start debugging this

@niko
32,768 is 2^15 which ought to hit the limit for an i16 numeric: https://doc.rust-lang.org/reference/types/numeric.html

So I'm guessing a task counter/manager somewhere in tokio is i16?

Numeric types - The Rust Reference