cesbit / aiowmi

Python WMI Queries
GNU General Public License v3.0
27 stars 8 forks source link

IOError: [Errno 24] Too many open files #29

Open 3gr4s opened 1 year ago

3gr4s commented 1 year ago

Describe the bug We're getting fatal errors that ends in timeouts problems, with too many processes on our nagios server and making it freeze. Before the issue, the log says: IOError: [Errno 24] Too many open files Than, a gunicorn thead goes in timeout, get killed and recreated.

Additional context We used the gunicorn "version" of the systemd service. At the moment, we set gunicorn with 8 worker and 8 thread. We tried with less (5) and more (10), but after some time the service still showed the same error. The last time, I created a new local user, increased the open file limit to 16384 (adding a row in /etc/security/limits.conf file) and edited the systemd unit file to use the new user. I've also tested the access with the new user, and after the change it shows the new limit. However, after some time, the service still reach the limit and nagios wmi check start freezing. Do you think the limit is still too low and it should be raised? On nagios there are around 4-5000 wmi checks, which are often requested in parallel. I don't have a more detailed log at the moment, but I can get it the next time. Do you have any advice?