AMC Script execution extremely slow
Posted: 08 Oct 2022, 15:29
I just upgraded my system to Ubuntu 22.04 a few days back. Filebot has been reinstalled using the APT package and both app and amc script started working fine. However very suddenly yesterday afternoon, its execution time ground to a complete halt. I removed and reinstalled Filebot, restarted the machine many times but this has had no effect. I left it running yesterday and it took over 10 hours to complete execution for just 32 files, which usually would be a mere matter of minutes before. No errors were shown in error.log or amc.log for me to investigate.
I run filebot via a straightforward bash script which i have barely changed in over 6 years:
sysinfo:
error.log
amc.log
https://pastebin.com/wbJkj5mJ
I turned on time logging so I could demonstrate the problem and just re-ran the script. As you can see from the console output, after reading parameters, it doesnt start unarchiving files until well over 30 mins later.
I even investigated system monitor while the script is running and neither openjdk, filebot or bash seem to be using much memory or CPU to indicate a leak or runaway process. I cannot for the life of me figure out what is wrong since it started off working fine. As you can see from my sysinfo, system resources for RAM or CPU are clearly not an issue.
I thought it could be some corrupted files in the target folder, but i cleared the folder to one file and though it got through a few more steps, it has been stuck on the last step for over 10 minutes (current time is 2022-10-08 16:20).
The only app writing to the target folder is qbittorrent via a docker container. I have also tried renaming from the GUI, and once I click my preset the files selected take over 5 mins to appear correctly in the right window.
Any ideas on what I can investigate next would be very welcome! Thanks so much for your help in advance.
I run filebot via a straightforward bash script which i have barely changed in over 6 years:
Code: Select all
#!/bin/bash
filebot -script fn:amc --output "/mnt/data/torrents/processed" --action hardlink --conflict auto -non-strict "/mnt/data/torrents/complete" --log-file /mnt/data/torrents/processed/amc.log --def excludeList=amc.txt clean=y unsorted=n artwork=n subtitles=en deleteAfterExtract=n storeReport=reports reportError=y pushover=u2d3uvztef3j3ki8vz29mb5gdhr4fa "seriesFormat=/mnt/data/media/{plex.id} [{vf}, {vs}, {vc}, {bitrate}]" "movieFormat=/mnt/data/media/{plex.id} (edition-{tags[0]}) [{vf}, {vs}, {vc}, {bitrate}]"
Code: Select all
FileBot 4.9.6 (r9125)
JNA Native: 6.1.1
MediaInfo: 21.09
Tools: fpcalc/1.5.1 7z/16.02 unrar/6.11
Extended Attributes: OK
Unicode Filesystem: OK
GVFS: PlatformGVFS [/run/user/1000/gvfs]
Script Bundle: 2022-08-15 (r836)
Groovy: 3.0.9
JRE: OpenJDK Runtime Environment 11.0.16
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 4.2 GB Max Memory / 45 MB Used Memory
OS: Linux (amd64)
HW: Linux houseofel 5.15.0-48-generic #54-Ubuntu SMP Fri Aug 26 13:26:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
CPU/MEM: Intel(R) Core(TM) i3-8300T CPU @ 3.20GHz [MemTotal: 16 GB | MemFree: 445 MB | MemAvailable: 10 GB | SwapCached: 135 MB | SwapTotal: 2.1 GB | SwapFree: 989 MB]
STORAGE: NONE
USER: houseofel
DATA: /home/houseofel/.filebot
Package: DEB
License: FileBot License PX21730371 (Valid-Until: 2070-12-28)
[2022-10-08 15:02:57.382] Done ヾ(@⌒ー⌒@)ノ
Code: Select all
Oct 07, 2022 3:15:56 PM net.filebot.ui.transfer.FileTransferable lambda$getFilesFromTransferable$0
WARNING: GVFS: file:///home/houseofel/licence => java.io.FileNotFoundException: /home/houseofel/licence
Oct 07, 2022 3:15:56 PM net.filebot.ui.transfer.FileTransferable lambda$getFilesFromTransferable$0
WARNING: GVFS: file:///home/houseofel/licence => java.io.FileNotFoundException: /home/houseofel/licence
Oct 07, 2022 4:13:04 PM net.filebot.DiskStore acquireDiskStore
WARNING: Initialize new disk cache: /home/houseofel/.filebot/cache/1
Oct 07, 2022 4:17:55 PM net.filebot.License lambda$verifyLicense$1
WARNING: Activate License [PX21730371] on [Fri Oct 07 16:17:55 BST 2022]
Oct 07, 2022 4:21:41 PM net.filebot.DiskStore acquireDiskStore
WARNING: Initialize new disk cache: /home/houseofel/.filebot/cache/0
Oct 07, 2022 4:21:43 PM net.filebot.License lambda$verifyLicense$1
WARNING: Activate License [PX21730371] on [Fri Oct 07 16:21:43 BST 2022]
Oct 08, 2022 2:02:25 PM net.filebot.License lambda$verifyLicense$1
WARNING: Activate License [PX21730371] on [Sat Oct 08 14:02:25 BST 2022]
https://pastebin.com/wbJkj5mJ
I turned on time logging so I could demonstrate the problem and just re-ran the script. As you can see from the console output, after reading parameters, it doesnt start unarchiving files until well over 30 mins later.
Code: Select all
houseofel@houseofel:~$ bash Documents/filebotScript.bash
[2022-10-08 14:25:10.258] Run script [fn:amc] at [Sat Oct 08 14:25:10 BST 2022]
[2022-10-08 14:25:10.283] Parameter: excludeList = amc.txt
[2022-10-08 14:25:10.284] Parameter: clean = y
[2022-10-08 14:25:10.284] Parameter: unsorted = n
[2022-10-08 14:25:10.284] Parameter: artwork = n
[2022-10-08 14:25:10.284] Parameter: subtitles = en
[2022-10-08 14:25:10.285] Parameter: deleteAfterExtract = n
[2022-10-08 14:25:10.285] Parameter: storeReport = reports
[2022-10-08 14:25:10.285] Parameter: reportError = y
[2022-10-08 14:25:10.285] Parameter: pushover = *****
[2022-10-08 14:25:10.286] Parameter: seriesFormat = /mnt/data/media/{plex.id} [{vf}, {vs}, {vc}, {bitrate}]
[2022-10-08 14:25:10.286] Parameter: movieFormat = /mnt/data/media/{plex.id} (edition-{tags[0]}) [{vf}, {vs}, {vc}, {bitrate}]
[2022-10-08 14:25:10.290] Argument[0]: /mnt/data/torrents/complete
[2022-10-08 14:25:10.599] Use excludes: /mnt/data/torrents/processed/amc.txt (28)
[2022-10-08 15:02:15.632] Read archive [day.shift.2022.proper.1080p.web.h264-rumour.rar] and extract to [/mnt/data/torrents/complete/Day.Shift.2022.PROPER.1080p.WEB.h264-RUMOUR/day.shift.2022.proper.1080p.web.h264-rumour/Day.Shift.2022.PROPER.1080p.WEB.h264-RUMOUR]
[2022-10-08 15:02:20.475] Include [/mnt/data/torrents/complete/Day.Shift.2022.PROPER.1080p.WEB.h264-RUMOUR/day.shift.2022.proper.1080p.web.h264-rumour/Day.Shift.2022.PROPER.1080p.WEB.h264-RUMOUR/Day.Shift.2022.PROPER.1080p.WEB.h264-RUMOUR.mkv]
[2022-10-08 15:02:20.475] Skipped [/mnt/data/torrents/complete/Day.Shift.2022.PROPER.1080p.WEB.h264-RUMOUR/day.shift.2022.proper.1080p.web.h264-rumour/Day.Shift.2022.PROPER.1080p.WEB.h264-RUMOUR/Day.Shift.2022.PROPER.1080p.WEB.h264-RUMOUR.mkv] because [/mnt/data/torrents/complete/Day.Shift.2022.PROPER.1080p.WEB.h264-RUMOUR/day.shift.2022.proper.1080p.web.h264-rumour/Day.Shift.2022.PROPER.1080p.WEB.h264-RUMOUR/Day.Shift.2022.PROPER.1080p.WEB.h264-RUMOUR.mkv] already exists (6 GB)
[2022-10-08 15:02:42.850] Read archive [elementary.s03e11.1080p.web.h264-dimepiece.rar] and extract to [/mnt/data/torrents/complete/Elementary.S03E11.1080p.WEB.H264-DiMEPiECE/elementary.s03e11.1080p.web.h264-dimepiece/Elementary.S03E11.1080p.WEB.H264-DiMEPiECE]
I thought it could be some corrupted files in the target folder, but i cleared the folder to one file and though it got through a few more steps, it has been stuck on the last step for over 10 minutes (current time is 2022-10-08 16:20).
Code: Select all
houseofel@houseofel:~$ bash Documents/filebotScript.bash
[2022-10-08 16:07:43.468] Run script [fn:amc] at [Sat Oct 08 16:07:43 BST 2022]
[2022-10-08 16:07:43.489] Parameter: excludeList = amc.txt
[2022-10-08 16:07:43.490] Parameter: clean = y
[2022-10-08 16:07:43.490] Parameter: unsorted = n
[2022-10-08 16:07:43.490] Parameter: artwork = n
[2022-10-08 16:07:43.490] Parameter: subtitles = en
[2022-10-08 16:07:43.491] Parameter: deleteAfterExtract = n
[2022-10-08 16:07:43.491] Parameter: storeReport = reports
[2022-10-08 16:07:43.491] Parameter: reportError = y
[2022-10-08 16:07:43.491] Parameter: pushover = *****
[2022-10-08 16:07:43.491] Parameter: seriesFormat = /mnt/data/media/{plex.id} [{vf}, {vs}, {vc}, {bitrate}]
[2022-10-08 16:07:43.492] Parameter: movieFormat = /mnt/data/media/{plex.id} (edition-{tags[0]}) [{vf}, {vs}, {vc}, {bitrate}]
[2022-10-08 16:07:43.495] Argument[0]: /mnt/data/torrents/complete
[2022-10-08 16:07:43.677] Use excludes: /mnt/data/torrents/processed/amc.txt (0)
[2022-10-08 16:08:05.058] Input: /mnt/data/torrents/complete/The Lost City 2022 1080p Blu-ray Remux AVC TrueHD 7.1-HDT.mkv
[2022-10-08 16:08:05.116] └─ Metadata: The Lost City (2022)
[2022-10-08 16:08:07.986] Group: {Movie=The Lost City (2022)} => [The Lost City 2022 1080p Blu-ray Remux AVC TrueHD 7.1-HDT.mkv]
[2022-10-08 16:08:07.995] Get [English] subtitles for 1 file
[2022-10-08 16:08:07.995] Looking up subtitles by hash via OpenSubtitles
[2022-10-08 16:08:08.898] No subtitle match by hash: /mnt/data/torrents/complete/The Lost City 2022 1080p Blu-ray Remux AVC TrueHD 7.1-HDT.mkv
[2022-10-08 16:08:08.910] Rename movies using [TheMovieDB]
[2022-10-08 16:08:08.911] Auto-detect movie from context [/mnt/data/torrents/complete/The Lost City 2022 1080p Blu-ray Remux AVC TrueHD 7.1-HDT.mkv]
Any ideas on what I can investigate next would be very welcome! Thanks so much for your help in advance.