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?