-
Notifications
You must be signed in to change notification settings - Fork 152
Memory leak / FD exhaustion #525
Description
Hi,
I have been using librqbit for almost a year without issue. I recently changed the trackers and I am facing issues since then. It's difficult so far to pinpoint the real issue, here is what I got so far:
I wrapped librqbit into an long-lived app (server-like). After I switched trackers, I have been hitting a file descriptor limit (my default was set pretty low). I increased the limit, but I am now facing out of memory issues after a while that seems to be coming from librqbit.
I traced allocations with dhat and what seems to be the culprit is that I keep accepting connections from peers, even if the torrent is completed, and I'm supposed to be in no_upload mode.
- This is the dhat tracking results for block allocations: https://pastebin.com/sc0PVXPA
- This is the dhat tracking results for size allocations: https://pastebin.com/CYr85wNw
On the side of my app, the way I am using librqbit is that I start a torrent, and leave it available for streaming. I never "pause" or "stop" the torrent so I guess it is always running. But I am not sure why I am still seeing peers despite having the torrent completed and upload disabled?
I am experimenting with setting timeouts on session.peer_opts, but it is too early to tell if this fixes the issue.
I am not sure this is a librqbit issue, and maybe more the way I am using the library, but any insight/help would be greatly appreciated.
EDIT: I'm using v8.1.1