Image missing.
Too Many Open Files

created: June 6, 2025, 3:18 p.m. | updated: June 7, 2025, 4:34 p.m.

dr-xr-xr-x 9 pi pi 0 Jun 4 00:39 .. lrwx------ 1 root root 64 Jun 4 00:40 0 -> /dev/null lrwx------ 1 root root 64 Jun 4 00:40 1 -> /dev/null lrwx------ 1 root root 64 Jun 4 00:40 10 -> /dev/ptmx lrwx------ 1 root root 64 Jun 4 00:40 11 -> /dev/ptmx lrwx------ 1 root root 64 Jun 4 00:40 2 -> /dev/null lrwx------ 1 root root 64 Jun 4 00:40 3 -> 'socket:[14023056]' lrwx------ 1 root root 64 Jun 4 00:40 4 -> 'socket:[14023019]' lrwx------ 1 root root 64 Jun 4 00:40 5 -> 'socket:[14022300]' lrwx------ 1 root root 64 Jun 4 00:40 6 -> 'socket:[14023037]' lrwx------ 1 root root 64 Jun 4 00:40 7 -> /dev/ptmx l-wx------ 1 root root 64 Jun 4 00:40 8 -> /run/systemd/sessions/1501.refAs you can see, we have 0 , 1 and 2 as expected, but we also have a bunch of other file descriptors. $ lsof -p $(echo $$) COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME zsh 39367 mattrighetti cwd DIR 1,17 2496 250127 /Users/mattrighetti zsh 39367 mattrighetti txt REG 1,17 1361200 1152921500312522433 /bin/zsh zsh 39367 mattrighetti txt REG 1,17 81288 1152921500312535786 /usr/share/locale/en_US.UTF-8/LC_COLLATE zsh 39367 mattrighetti txt REG 1,17 170960 1152921500312525313 /usr/lib/zsh/5.9/zsh/zutil.so zsh 39367 mattrighetti txt REG 1,17 118896 1152921500312525297 /usr/lib/zsh/5.9/zsh/terminfo.so zsh 39367 mattrighetti txt REG 1,17 171344 1152921500312525281 /usr/lib/zsh/5.9/zsh/parameter.so zsh 39367 mattrighetti txt REG 1,17 135696 1152921500312525255 /usr/lib/zsh/5.9/zsh/datetime.so zsh 39367 mattrighetti txt REG 1,17 135568 1152921500312525291 /usr/lib/zsh/5.9/zsh/stat.so zsh 39367 mattrighetti txt REG 1,17 338592 1152921500312525247 /usr/lib/zsh/5.9/zsh/complete.so zsh 39367 mattrighetti txt REG 1,17 136880 1152921500312525293 /usr/lib/zsh/5.9/zsh/system.so zsh 39367 mattrighetti txt REG 1,17 593088 1152921500312525303 /usr/lib/zsh/5.9/zsh/zle.so zsh 39367 mattrighetti txt REG 1,17 134928 1152921500312525287 /usr/lib/zsh/5.9/zsh/rlimits.so zsh 39367 mattrighetti txt REG 1,17 117920 1152921500312525263 /usr/lib/zsh/5.9/zsh/langinfo.so zsh 39367 mattrighetti txt REG 1,17 2289328 1152921500312524246 /usr/lib/dyld zsh 39367 mattrighetti txt REG 1,17 208128 1152921500312525249 /usr/lib/zsh/5.9/zsh/complist.so zsh 39367 mattrighetti txt REG 1,17 118688 1152921500312525285 /usr/lib/zsh/5.9/zsh/regex.so zsh 39367 mattrighetti txt REG 1,17 118288 1152921500312525305 /usr/lib/zsh/5.9/zsh/zleparameter.so zsh 39367 mattrighetti 0u CHR 16,1 0t17672 1643 /dev/ttys001 zsh 39367 mattrighetti 1u CHR 16,1 0t17672 1643 /dev/ttys001 zsh 39367 mattrighetti 2u CHR 16,1 0t17672 1643 /dev/ttys001 zsh 39367 mattrighetti 10u CHR 16,1 0t5549 1643 /dev/ttys001According to the lsof documentation:cwd : The current working directory of the process. If a process tries to open more files than its soft limit, the operating system will typically return an error (e.g., "Too many open files"). waiting for 'cargo test' to start... Found 'cargo test' with PID: 44152 01:46:21 - Main PID (44152) - open: 14 01:46:21 - Main PID (44152) - open: 32 01:46:21 - Main PID (44152) - open: 78 01:46:21 - Main PID (44152) - open: 155 01:46:21 - Main PID (44152) - open: 201 01:46:21 - Main PID (44152) - open: 228 01:46:21 - Main PID (44152) - open: 231 01:46:21 - Main PID (44152) - open: 237 # errors started happening here 01:46:21 - Main PID (44152) - open: 219 01:46:21 - Main PID (44152) - open: 205 01:46:21 - Main PID (44152) - open: 180 01:46:21 - Main PID (44152) - open: 110 01:46:21 - Main PID (44152) - open: 55 01:46:21 - Main PID (44152) - open: 28 01:46:21 - Main PID (44152) - open: 15 01:46:21 - Main PID (44152) - open: 0 PID 44152 no longer running. Open File Descriptors Over TimeThe above chart shows the number of open file descriptors with the new soft limit.

1 day, 10 hours ago: Hacker News