Score:0

Transmission-daemon seems to stop responding when "script-torrent-done" runs

id flag
Naf

Setup: Ubuntu server 22.04.1 LTS transmission-daemon 3.00 Transmission Remote GUI v5.18.0 running on Ubuntu desktop 22.04.1 LTS

When particular torrents finish, the script that runs copies them across to another directory:

    COPYFROM=<copy from DIR>
    COPYTO=<copy to DIR>
    LOGFILE=<DIR>CopyLog.txt

    echo -e "\n\n====================================================" >> "$LOGFILE"
    echo -e "$(date) $TR_TORRENT_NAME" >> "$LOGFILE"
    #echo -e  "\n$COPYFROM \n$COPYTO \n$TR_TORRENT_DIR \n$TR_TORRENT_NAME"  >> "$LOGFILE"

    if [ "$TR_TORRENT_DIR" = "$COPYFROM" ]; then
        echo -e "\n===Copying===" >> "$LOGFILE"
        tsp -C
        tsp rsync -rpv <list of --excludes> "$TR_TORRENT_DIR/$TR_TORRENT_NAME" "$COPYTO" >> "$LOGFILE"
        tail -n 500 "$LOGFILE" | sponge "$LOGFILE"
        echo -e "\n" >> "$LOGFILE"
    fi

Essentially it just checks if the completed torrent has downloaded to the relevant directory, and if it has then it writes to a log file and adds the rsync copy command to the tsp list. All in all the whole thing achieves what I want it to, I've been using it for a few years now and it's stable.

Except when multiple torrents finish and are being managed by the tsp queue around the same time. When that happens, my Transmission Remote GUI stops being able to maintain its connection to the transmission-daemon. All other access to the server is fine, media being streamed is unaffected, I can still SSH into the server, the torrent downloads still seem to continue, as does the tsp queue. htop shows that the CPU and RAM usage is perfectly normal, and once the copy commands complete it all returns back to normal.

I could understand this if the scripts were doing the copy procedure themselves, and so not closing and all running in parallel; but the whole point of using tsp was so that all got handed off and the transmission scripts would just return. In fact I used to run it as a cp job in the script (followed by a rm for what are now --excludes); I just can't remember now if that was the same, or if it didn't do it.

I'm not really sure what could be the cause, or where to look?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.