Skip to content

Memory leak / FD exhaustion #525

@0xAcid

Description

@0xAcid

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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions