qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
26.85k stars 3.87k forks source link

Repeated "Your System Has Run out of Application Memory" on macOS #20708

Open oharag1111 opened 4 months ago

oharag1111 commented 4 months ago

qBittorrent & operating system versions

qBit 4.6.4 MacOS 14.4.1 (M1 MacMini) - 16 GB memory - 1 TB HD

What is the problem?

image

I've been running Qbit for 2-3 weeks (in some cases non-stop). Just yesterday Qbit would eventually become sluggish and the spinning beach ball would appear. I would then get an Apple message that I have run out of memory and I needed to force quit Qbit. It was consuming 58 GB - the first time this happened it had consumed 89 GB memory. Even quitting and restarting Qbit - the memory consumpton started ran away. The second time I watched Qbit memory using Activity Monitor (apple). Initially Qbit grabs 1 GB - within 20 minutes it's up to 2 GB - less than an hour it's 8 GB - and it goes on from there until I have to Force Quit Qbit

Steps to reproduce

  1. Start Qbit - watch Qbit consume tons of memory - force quit Qbit.
  2. Start Qbit - watch Qbit consume tons of memory - force quit Qbit.
  3. Stop using Qbit until this is resolved.

Additional context

I do have to say I have been running behind a VPN while running Qbit. Recently I have been having a heck of a problem keeping speeds/internet from not crashing. This is a recent event. I have tried running SW VPN (ProtonVPN) - router OpenVPN. I do not know if it's my IP going after me - throttling. For a good 2-3 weeks I had no issues. Now I get ZERO speeds running QBbit - can't access internet. But I do not believe this is why Qbit has runaway memory issues. Can a malicious torrent cause this? Is this even possible?

Log(s) & preferences file(s)

I do not know where to find log file on MacOSX.

oharag1111 commented 4 months ago

It happened again. I started ProtonVPN - started Qbit - 1 Gb then 2 GB and then eventually 5 GB. Then all of the sudden Qbit downloads pause - and then the memory shoots up to - in the case 84.88 GB.

Screenshot 2024-04-15 at 9 42 19 PM

Screenshot 2024-04-15 at 9 42 44 PM

This all occurs in this than a minute.

oharag1111 commented 4 months ago

Hello - Qbit has been running without issue - though I believe the reason for (run away) memory issues on my Mac was due to too many torrents in my que. But If no torrents are being processed why does this cause the memory to increase so significantly? I had as many torrents in due for weeks - then all of the sudden the memory would all of the sudden balloon to cause my Mac to give me a memory issue.

Jorsher commented 4 months ago

Hello - Qbit has been running without issue - though I believe the reason for (run away) memory issues on my Mac was due to too many torrents in my que. But If no torrents are being processed why does this cause the memory to increase so significantly? I had as many torrents in due for weeks - then all of the sudden the memory would all of the sudden balloon to cause my Mac to give me a memory issue.

Have you tried disabling disk cache?

Advanced -> Disk Cache: Looks like it defaults to -1 (unlimited). Try setting it to 0 (off).

I use qbittorrent-nox on a linux system and once I disabled disk cache, the RAM usage dropped significantly -- as expected. The clients with 20-25k torrents are only using <1.2GB.

I installed qbit 4.6.4 on my Mac to test disk cache, added an Ubuntu torrent. With the default, unlimited disk cache, the ram climbed from 120MB to gigs -- consistent with the amount downloaded, reflecting it's being cached. I set cache to '0' and the RAM usage dropped back to 120MB. I know you said you didn't have any active torrents, but try disabling the disk cache if you haven't already.

xavier2k6 commented 4 months ago

@oharag1111 Can you please provide more qBittorrent info - libtorrent version etc.

It also seems that this may be specific to Sonoma