Failed to Collect Data Because the Number of File Descriptors Exceeded the Maximum
Symptom
A data collection task failed because the number of file descriptors exceeded the maximum. Increase the maximum number of file descriptors as required.
Possible Cause
The process of the data collection task requires more file descriptors than it is allowed to have.
Troubleshooting Procedure
Exercise caution when changing the maximum number of file descriptors because it may bring the following risks:
- Excessive system resource consumption: If the maximum number of file descriptors is set to a large value, more system resources will be consumed, which may slow down or crash the system.
- Security issue: If the maximum number of file descriptors is set to a large value, the system is prone to attacks because attackers can use more file descriptors to consume system resources or perform malicious operations.
- Application compatibility issue: If the maximum number of file descriptors is set to a large value, some applications may crash or cannot work properly.
- Changing the maximum number of file descriptors on a local node
- Locate the service file of gunicorn_framework.service.
1systemctl status gunicorn_framework.service
Figure 1 Service details
- Add a configuration item.
1vi /usr/lib/systemd/system/gunicorn_framework.serviceAdd the LimitNOFILE parameter to the [Service] section.
Figure 2 New configuration item
Press Esc, type :wq!, and press Enter to save the file and exit.
- Restart gunicorn_framework.service.
1 2
systemctl daemon-reload systemctl restart gunicorn_framework.service
- Changing the maximum number of file descriptors on a remote node
Add the following content to the file:
1 2
devkit soft nofile configured_value devkit hard nofile configured_value
Figure 3 Added content
Press Esc, type :wq!, and press Enter to save the file and exit.
Parent topic: FAQs