Get the latest tech news
Too Many Open Files
Recently I’ve been working on a pretty big rust project and to my surprise Icouldn’t get tests to work properly.
Ever wondered how your programs juggle multiple tasks - reading files, sending data over the network, or even just displaying text on your screen - all at once? My assumption was that since cargo test gets executed in my terminal, it inevitably reaches a point where it tries to open more files than the soft limit set by my shell, which is 256 in this case. I wanted to confirm this hypothesis, so I created this monitoring script that watches for cargo test PID and prints the number of open file descriptors at different intervals.
Or read this on Hacker News