WLAN-Pi / wlanpi-profiler

Wi-Fi client capabilities analyzer tool built for the WLAN Pi
BSD 3-Clause "New" or "Revised" License
25 stars 9 forks source link

[interface] Too many open files in system (-23) #117

Open joshschmelzle opened 1 year ago

joshschmelzle commented 1 year ago

In some scenarios, it is possible to hit the open file limit.

2022-10-18 23:39:16,355 [DEBUG] interface: command failed: Too many open files in system (-23)

I believe refactoring the run_command() code by using a context manager may fix this problem. Otherwise we may need to explicitly close file descriptors after opening them.

https://github.com/WLAN-Pi/wlanpi-profiler/blob/1bc9070193694b012550987471e8d68919739935/profiler/helpers.py#L536-L550