beets: Beets uses all available memory during import and then crashes
Problem
Beets program crashes after all memory appears to be consumed. I noticed that as an import continues, my memory usage increases. Once all system memory is consumed, beets crashes (see end of verbose output below). If I allocate more memory, then it only prolongs the crash. Doesn’t seem to be related to specific files. Disabling all plugins seems to prevent the memory consumption and crash from happening.
Running this command in verbose (-vv
) mode:
$ beet -vv import -qp /mnt/music/
Led to this problem:
scrub: auto-scrubbing /mnt/downloads/new_music_collection/Avantasia/The Mystery of Time_ A Rock Epic [2013]/10 - The Great Mystery.mp3
scrub: writing new tags after scrub
Sending event: write
Sending event: after_write
scrub: restoring art
scrub: auto-scrubbing /mnt/downloads/new_music_collection/Avantasia/The Mystery of Time_ A Rock Epic [2013]/07 - Invoke the Machine.mp3
chroma: chroma: fingerprinted '/mnt/music/Avantasia/The Scarecrow [2008]/04 - Carry Me Over.mp3'
chroma: no match found
scrub: writing new tags after scrub
Sending event: write
Sending event: after_write
scrub: restoring art
Sending event: album_imported
chroma: chroma: fingerprinted '/mnt/music/Avantasia/The Scarecrow [2008]/05 - What Kind of Love.mp3'
chroma: no match found
chroma: chroma: fingerprinted '/mnt/music/Avantasia/The Scarecrow [2008]/06 - Another Angel Down.mp3'
chroma: no match found
chroma: chroma: fingerprinted '/mnt/music/Avantasia/The Scarecrow [2008]/07 - The Toy Master.mp3'
chroma: no match found
chroma: chroma: fingerprinted '/mnt/music/Avantasia/The Scarecrow [2008]/08 - Devil in the Belfry.mp3'
chroma: no match found
chroma: chroma: fingerprinted '/mnt/music/Avantasia/The Scarecrow [2008]/09 - Cry Just a Little.mp3'
chroma: no match found
chroma: chroma: fingerprinted "/mnt/music/Avantasia/The Scarecrow [2008]/10 - I Don't Believe in Your Love.mp3"
chroma: no match found
chroma: chroma: fingerprinted '/mnt/music/Avantasia/The Scarecrow [2008]/11 - Lost in Space.mp3'
chroma: no match found
Looking up: /mnt/music/Avantasia/The Scarecrow [2008]
Tagging Avantasia - The Scarecrow
Searching for discovered album ID: f72ea7dc-5316-36ac-9833-2476d88b62e6
Sending event: albuminfo_received
Candidate: Avantasia - The Scarecrow
Success. Distance: 0.00
Album ID match recommendation is Recommendation.strong
ID match.
Sending event: import_task_start
/mnt/music/Avantasia/The Scarecrow [2008] (11 items)
Tagging:
Avantasia - The Scarecrow
URL:
http://musicbrainz.org/release/f72ea7dc-5316-36ac-9833-2476d88b62e6
(Similarity: 100.0%) (CD, 2008, BR, Nuclear Blast)
Sending event: import_task_choice
Sending event: import_task_apply
Killed
Setup
- OS: Debian GNU/Linux 9.6 (stretch)
- Python version: Python 2.7.13
- beets version: 1.3.18
- Turning off plugins made problem go away (yes/no): yes
My configuration (output of beet config
) is:
## beets config file
## See https://beets.readthedocs.io for more info
directory: /mnt/downloads/new_music_collection
library: ~/.config/beets/library.db
threaded: yes
ui:
color: yes
colors:
text_success: green
text_warning: yellow
text_error: red
text_highlight: red
text_highlight_minor: lightgray
action_default: turquoise
action: blue
import:
write: yes ## Either yes or no, controlling whether metadata (e.g., ID3) tags are written to files when using beet import. Defaults to yes.
# copy: no ## Either yes or no, indicating whether to copy files into the library directory when using beet import. Defaults to yes.
# move: yes ## Either yes or no, indicating whether to move files into the library directory when using beet import. Defaults to no.
resume: ask ## Controls whether interrupted imports should be resumed.
log: ~/.config/beets/log.txt
quiet_fallback: skip
duplicate_action: skip
match:
strong_rec_thresh: 0.02
paths:
default: $albumartist/$album [$year]/$track - $title
singleton: Non-Album/$artist/$title
comp: Compilations/$album [$year]/$track - $title
albumtype:soundtrack: Soundtracks/$album [$year]/$track - $title
plugins:
chroma
fromfilename
scrub
info
missing
duplicates
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (9 by maintainers)
In case anybody getting here via google needs to do what @ncelebic said, here’s the command :
sudo docker exec -u abc -it [CONTAINERNAME] pip3 install --user --upgrade https://github.com/beetbox/audioread/archive/master.zip
[CONTAINERNAME] is, well, your container name.
Cheers
@ssssam I just tried this and it works great. Memory was under 105MB during an import, where previously after importing several albums it would be over 2GB. I’m using a docker container and the only modification I made was to install that audioread package.