Closed xoriole closed 6 years ago
Tribler should handle open file descriptors in a smarter way. In this issue, it seems to be caused by a large number of open sockets due to HTTP requests to the torrent health checker.
Or we can simply have a queue of outstanding torrent health requests in the GUI.
We could make a request priority system for TriblerRequestManager.perform_request()
, based on the number of unanswered requests (window).
Something like:
Actually, this would be a good opportunity to clean stuff like this:
And refactor the queue logic into a single class.
If someone has the time, could you checkout https://github.com/qstokkink/tribler/tree/gui_request_queue and click all the things to see if something breaks (specifically by performing a lot of health requests)?
If you want to see the queue in action, change the following line:
https://github.com/qstokkink/tribler/blob/ede9946ce8b3f4729a55781d12851f2bcb58a191/TriblerGUI/tribler_request_manager.py#L140
To: request_queue = RequestQueue(max_outstanding=5)
And click a lot of torrents with unknown health.
Platform: Linux-4.10.0-42-generic-x86_64-with-Ubuntu-16.04-xenial Report: (#11881)