qBittorrent randomly closes

This has been happening for a few weeks and I don’t know why. Here below I put the error that it gives me

root@DietPi:~# sudo systemctl status qbittorrent
● qbittorrent.service - qBittorrent (DietPi)
     Loaded: loaded (/etc/systemd/system/qbittorrent.service; disabled; vendor preset: enabled)
     Active: failed (Result: signal) since Sat 2022-09-03 14:30:13 CEST; 1h 20min ago
       Docs: man:qbittorrent-nox(1)
    Process: 2641 ExecStart=/usr/bin/qbittorrent-nox (code=killed, signal=KILL)
   Main PID: 2641 (code=killed, signal=KILL)
        CPU: 1d 6h 8.244s

ira 03 14:30:13 DietPi systemd[1]: qbittorrent.service: Main process exited, code=killed, status=9/KILL
ira 03 14:30:13 DietPi systemd[1]: qbittorrent.service: Failed with result 'signal'.
ira 03 14:30:13 DietPi systemd[1]: qbittorrent.service: Consumed 1d 6h 8.244s CPU time.
Warning: journal has been rotated since unit was started, output may be incomplete.

You could have a look to logs. Maybe there are more information on the reason the process got killed

journalctl -u qbittorrent

just put this

root@DietPi:~# journalctl -u qbittorrent
-- Journal begins at Thu 2022-09-01 13:17:19 CEST, ends at Sat 2022-09-03 20:21:08 CEST. --
ira 03 14:30:13 DietPi systemd[1]: qbittorrent.service: Main process exited, code=killed, status=9/KILL
ira 03 14:30:13 DietPi systemd[1]: qbittorrent.service: Failed with result 'signal'.
ira 03 14:30:13 DietPi systemd[1]: qbittorrent.service: Consumed 1d 6h 8.244s CPU time.
ira 03 15:50:45 DietPi systemd[1]: Started qBittorrent (DietPi).

What about:

dmesg -l err,crit,alert,emerg

This

root@DietPi:~# dmesg -l err,crit,alert,emerg
[    0.611237] bcm2708_fb soc:fb: Unable to determine number of FBs. Disabling driver.
[450206.569642] Out of memory: Killed process 2641 (qbittorrent-nox) total-vm:2909704kB, anon-rss:1961168kB, file-rss:684kB, shmem-rss:0kB, UID:998 pgtables:5776kB oom_score_adj:0

There you go. You are running out of memory and your system start to kill process

Well, I have practically nothing installed, because I use it exclusively for qBittorrent

Have a look on resource usage using htop

I found some Issues related to version 4.2.4 and 4.2.5 (which is the version dietpi/ apt repo uses)
e.g. https://github.com/qbittorrent/qBittorrent/issues/12326
The most reported memory issues back then came from windows, so the reports could be a windows only problem or there are plenty more users on windows then on linux? idk.
But you can try and upgrade to a newer version and see if this helps, bookworm comes with version 4.4.4. https://packages.debian.org/de/bookworm/qbittorrent-nox

You could create a sources list for test in /etc/apt/sources.list.d, e.g. testing.list.
In this file you have

deb https://deb.debian.org/debian/          testing main contrib non-free
deb-src http://ftp.de.debian.org/debian/    testing main contrib non-free
deb     http://security.debian.org/         testing-security  main contrib non-free

then run apt-get update
and now you can install the 4.4.4 version with

apt-get -t testing install qbittorent-nox

idk how this will behave to the other version already installed, maybe you can delete it beforehand.

Be careful with adding testing repository for Debian Bullseye. This could easily upgrade other packages if you don’t do it with care.

I’m pretty new to commands and so on and I don’t know what to do in this part:

You could create a sources list for test in /etc/apt/sources.list.d, e.g. testing.list.
In this file you have

deb https://deb.debian.org/debian/          testing main contrib non-free
deb-src http://ftp.de.debian.org/debian/    testing main contrib non-free
deb     http://security.debian.org/         testing/updates  main contrib non-free

Well I have to say, this may break things, I’m about to trying this:

The following packages will be upgraded:
  libc-bin libc-dev-bin libc-l10n libc6 libc6-dev libglib2.0-0 libglib2.0-bin
  libglib2.0-dev libglib2.0-dev-bin libstdc++6 libzstd1 locales

This might break stuff on your system.
On my testsystem, where nothing else is installed, it works:
snap

In the case you will also try this, make a backup with dietpi-backup beforehand!
Then do (each section as a single command):

touch /etc/apt/sources.list.d/testing.list
cat <<EOT >> /etc/apt/sources.list.d/testing.list
deb https://deb.debian.org/debian/          testing main contrib non-free
deb-src http://ftp.de.debian.org/debian/          testing main contrib non-free
deb http://security.debian.org/          testing-security  main contrib non-free
EOT
apt update

Then use dietpi-software to install qbittorrent-nox. Or reinstall with

dietpi-software reinstall 46

Good luck! :smiley:

Or you try to compile Qbit from source by yourself. But this might be tricky as well :wink:

The guide might be outdated but could be user as starting point Compilation: Raspberry Pi OS and DietPi · qbittorrent/qBittorrent Wiki · GitHub

I managed to install 4.4.5, which is the latest, let’s see how it works… although from what I’ve read, 4.3.9 is better, could I put this one on? Thank you

EDIT: I confirm it, the latest version is very slow for me and I read that 4.3.9 consumes less resources, any idea how to install that version and remove the latest one?

I think you have to compile older releases by yourself:
https://sourceforge.net/projects/qbittorrent/files/qbittorrent/

dietpi-software uninstall 46
rm /etc/apt/sources.list.d/testing.list

This will remove Qbit. Once done, reboot and check if you are back on Bullseye

apt update
dietpi-software install 46

Version 4.4.5 was released, which is, according to some users on reddit, a “good” version again. :slight_smile: