-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beets uses all available memory during import and then crashes #3082
Comments
Hi! Is it true, as your issue form implied, that this occurs the same way even if you disable all the plugins? |
I thought I had disabled them and still had the issue, but I tried again with disabled plugins and the crash/memory consumption doesn't occur. I'm not sure which plugin is the culprit. |
OK! Please post again if you can narrow it down. |
Looks like the chroma plugin is the problem. I re-enabled only that plugin, ran the import again, and the issue occurred. All memory was consumed and then beets crashed. |
Got it; thanks! Any chance you've got GStreamer (and its Python bindings) installed? It's probably the same memory leak reported here: beetbox/audioread#62 |
I have a few gstreamer packages installed. Is there a recommended workaround?
|
Well, if it is in fact that very memory leak, one thing you could do is uninstall the Python bindings for GStreamer (more specifically, the pygobject library). Or, if you're feeling like it, maybe you can help us track down what's causing the leak, as the aforelinked thread discusses! |
I also have this issue, running in a docker container. I'm happy to do testing that could assist with my limited knowledge of programming. I have to abort the process when the memory gets high and then restart. It's corrupted the database a few times and i've had to start from scratch. I am using the linuxserver version of the container. |
@motorific, a great place to start would be to make sure this can be blamed on the chroma plugin. If so, the next place to look would be to investigate which audio-reading backend is being used—as mentioned above, to try uninstalling GStreamer, for example, to see if it's possible to blame that. |
@sampsyo It's for sure chroma. I added this to my config.yaml:
and there are no longer memory leak issues. Please let me know if i can provide other information that would be useful. |
Yo! Can you try uninstalling GStreamer and seeing what happens? |
I suspect this is the issue: beetbox/audioread#84 |
Juts wanted to point out that I've been running into this issue with the beets:latest container as well from dockerhub. This is running on a Centos7 vm with Docker Swarm, alongside 11 other containers. 4GB ram and 2 cores. Disabling the chroma plugin seems to resolve the issue as well for me. This has been such a plague of an issue, and finding this thread was difficult enough that I thought it worth commenting here. If you guys need any other host info or logs that could be helpful, I'll do what I can. |
Thanks! |
@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. |
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 |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? 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. |
Reading the comments, this seems to be fixed by updating audioread. |
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:Led to this problem:
Setup
My configuration (output of
beet config
) is:The text was updated successfully, but these errors were encountered: