linuxserver / docker-transmission

GNU General Public License v3.0
597 stars 187 forks source link

Very High Memory consumption #132

Closed sdhawade closed 2 years ago

sdhawade commented 4 years ago

linuxserver.io


Expected Behavior

Memory usage within few 100 MB

Current Behavior

Currently the docker image is consuming 4-8 GB of RAM

Steps to Reproduce

1.Start downloading a torrent 2.Memory size grows to the size of the downloaded image 3. 4.

Environment

OS: Synology NAS CPU architecture: x86_64/arm32/arm64 x86_64 How docker service was installed:

NAS Docker

Command used to create docker container (run/create/compose/screenshot)

docker run -d --name Transmission --ip="192.168.3.16" --network=mac_net --dns=192.168.3.5 -e TZ=Asia/Kolkata -p 9091:9091 -p 51413:51413 -p 51413:51413/udp -v /volume1/docker/Transmission:/config -v /volume2/Downloads/Torrent:/downloads -v /volume2/Downloads/Torrent/Watch:/watch --restart unless-stopped linuxserver/transmission

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 01-envfile: executing... [cont-init.d] 01-envfile: exited 0. [cont-init.d] 10-adduser: executing... usermod: no changes

      _         ()
     | |  ___   _    __
     | | / __| | |  /  \ 
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support LSIO projects visit: https://www.linuxserver.io/donate/

GID/UID

User uid: 911 User gid: 911

[cont-init.d] 10-adduser: exited 0. [cont-init.d] 20-config: executing... [cont-init.d] 20-config: exited 0. [cont-init.d] 99-custom-files: executing... [custom-init] no custom files found exiting... [cont-init.d] 99-custom-files: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [2020-10-13 15:34:34.994] Transmission 3.00 (bb6b5a062e) started (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/session.c:769) [2020-10-13 15:34:34.995] RPC Server Adding address to whitelist: 127.0.0.1 (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/rpc-server.c:956) [2020-10-13 15:34:34.995] RPC Server Serving RPC and Web requests on 0.0.0.0:9091/transmission/ (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/rpc-server.c:1243) [2020-10-13 15:34:34.995] RPC Server Password required (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/rpc-server.c:1254) [2020-10-13 15:34:34.995] DHT Reusing old id (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/tr-dht.c:383) [2020-10-13 15:34:34.995] DHT Bootstrapping from 196 IPv4 nodes (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/tr-dht.c:172) [2020-10-13 15:34:34.995] Using settings from "/config" (/home/buildozer/aports/community/transmission/src/transmission-3.00/daemon/daemon.c:646) [2020-10-13 15:34:34.995] Saved "/config/settings.json" (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/variant.c:1221) [2020-10-13 15:34:34.995] transmission-daemon requiring authentication (/home/buildozer/aports/community/transmission/src/transmission-3.00/daemon/daemon.c:674) [2020-10-13 15:34:34.995] Watching "/watch" for new .torrent files (/home/buildozer/aports/community/transmission/src/transmission-3.00/daemon/daemon.c:698) [2020-10-13 15:34:34.995] Loaded 2 torrents (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/session.c:2170) [2020-10-13 15:34:34.995] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/natpmp.c:73) [2020-10-13 15:34:34.995] Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/natpmp.c:73) [2020-10-13 15:34:42.995] Port Forwarding State changed from "Not forwarded" to "Starting" (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/port-forwarding.c:106) [2020-10-13 15:34:42.995] web will verify tracker certs using envvar CURL_CA_BUNDLE: none (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/web.c:455) [2020-10-13 15:34:42.995] web NB: this only works if you built against libcurl with openssl or gnutls, NOT nss (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/web.c:457) [2020-10-13 15:34:42.995] web NB: invalid certs will show up as 'Could not connect to tracker' like many other errors (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/web.c:458) [2020-10-13 15:34:42.995] Port Forwarding State changed from "Starting" to "???" (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/port-forwarding.c:106) [2020-10-13 15:34:42.995] Changed open file limit from 524288 to 1024 (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/fdlimit.c:408)

github-actions[bot] commented 4 years ago

Thanks for opening your first issue here! Be sure to follow the issue template!

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

tomnieuwland commented 3 years ago

I am also getting this problem on Ubuntu Server 20.04

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Ciuffi commented 3 years ago

I'm having the same issue, any fixes yet?

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

argium commented 3 years ago

This is still a problem.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

nagzso commented 2 years ago

I have the same issue and causes kernel panic everytime.

j0nnymoe commented 2 years ago

This is going to be related to how the application itself is configured/what it's doing than the actual container.

If someone would be able to post some compose info + updated logs, it would help.

nagzso commented 2 years ago

My setup:

It worked perfectly before and get ruined after 3 bigger (~15gb) torrent have been added. No issue when there is no torrent in download state. I also tried to limit the download bandwidth to 10MB but nothing changed.

Here is the dmesg report: dmesg.txt

This is the docker-compose.yml content:

version: '3.9'

services:
  transmission:
    image: lscr.io/linuxserver/transmission:arm32v7-version-3.00-r2
    container_name: transmission
#    profiles:
#      - donotstart
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Budapest
      - TRANSMISSION_WEB_HOME=/flood-for-transmission/
#      - TRANSMISSION_WEB_HOME=/combustion-release/
      - USER=transmission
      - PASS=s3cr3tP4ss
#      - WHITELIST=iplist
#      - HOST_WHITELIST=dnsnane list
    volumes:
      - ../data/transmission/config:/config
      - /mnt/storage/Downloads/Incomplete:/downloads/incomplete
      - /mnt/storage/Downloads/Completed:/downloads/complete
      - /mnt/storage/Downloads/Torrents:/watch
#    ports:
#      - "9091:9091"
#      - "51413:51413"
#      - "51413:51413/udp"
    mem_limit: 1g
    memswap_limit: 2g
    mem_reservation: 256m
#    oom_kill_disable: true
    restart: unless-stopped
    network_mode: "host"

The transmission settings:

{
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 4,
    "dht-enabled": true,
    "download-dir": "/downloads/complete",
    "download-queue-enabled": true,
    "download-queue-size": 5,
    "encryption": 1,
    "idle-seeding-limit": 30,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "/downloads/incomplete",
    "incomplete-dir-enabled": true,
    "lpd-enabled": false,
    "message-level": 2,
    "peer-congestion-algorithm": "",
    "peer-id-ttl-hours": 6,
    "peer-limit-global": 100,
    "peer-limit-per-torrent": 30,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "prefetch-enabled": true,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 2,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": true,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-host-whitelist": "",
    "rpc-host-whitelist-enabled": false,
    "rpc-password": "{719337f0858bb50a214fb9ee04f1e482685b29594/uVT8M2",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "transmission",
    "rpc-whitelist": "",
    "rpc-host-whitelist-enabled": false,
    "rpc-password": "{719337f0858bb50a214fb9ee04f1e482685b29594/uVT8M2",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "transmission",
    "rpc-whitelist": "",
    "rpc-whitelist-enabled": false,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 10000,
    "speed-limit-down-enabled": true,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": true,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 2,
    "upload-slots-per-torrent": 14,
    "utp-enabled": false,
    "watch-dir": "/watch",
    "watch-dir-enabled": true
}
nagzso commented 2 years ago

Update: It seems the transmission in the container never reaches the memory limit I set. "Weird thing" happened when I tried to map port range in the compose file (50200-51200:50200-51200), docker proxy caused OOM. Might it has nothing to do with the transmission image, but docker itself?

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

thelamer commented 2 years ago

Set a memory limit on the container if concerned about memory usage. I do not believe there are any changes we can make to the underlying container to have this program handle memory in a more efficient manner.