Skip to content
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

Panic with message "No space left on device" #166

Closed
joerg-krause opened this issue Mar 17, 2017 · 6 comments
Closed

Panic with message "No space left on device" #166

joerg-krause opened this issue Mar 17, 2017 · 6 comments

Comments

@joerg-krause
Copy link
Contributor

joerg-krause commented Mar 17, 2017

When playling long tracks on my embedded device with about 36MB of free RAM, librespot panics with: thread 'main' panicked at 'called Result::unwrap()on anErr value: Error { repr: Os { code: 28, message: "No space left on device" } }'.

For example using this track (45:31). Is there a way not to load the whole song into RAM?

@plietar
Copy link
Owner

plietar commented Mar 17, 2017

Interesting, I never really considered very large tracks.
librespot doesn't load the whole song into RAM, but it downloads it into /tmp, which may be the same thing if that is mounted as a tmpfs.

As a temporary workaround, you can change this line from NamedTempFile::new() to NamedTempFile::new_in("/somewhere/not/in/ram").

Ideally, if a cache directory is specified we can just use $CACHE/temp automatically for that.

@joerg-krause
Copy link
Contributor Author

Thanks, I will try this. In fact, this track is an extreme. It my also happen for tracks having a length of six or seven minutes, depending on the free RAM left.

@joerg-krause
Copy link
Contributor Author

On second thought, my system is NAND flash based. So, using anything else than the RAM for caching is not a good idea. So, I need a bigger RAM?

@plietar
Copy link
Owner

plietar commented Mar 23, 2017

Pretty much. A solution would be to change librespot to break up the files in blocks of say 500KB, and delete them automatically (if cache is disabled) once it has moved on to the next one. This is a large-ish change, so it's unlikely I'll be able to implement it anytime soon unfortunately.

@michaelherger
Copy link
Contributor

I've modified librespot to disable the audio file-cache. See pull request #181.

@joerg-krause
Copy link
Contributor Author

Closed due to lack of maintenance of the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants