Giter VIP home page Giter VIP logo

Comments (7)

mherger avatar mherger commented on September 26, 2024

Hmm... there must be something else going wrong (in the container, or the music storage, I don't know): my Pi has the same ulimit of 1024, but I was able to add 1600 tracks to my queue without any problem. LMS shouldn't keep all those file handles open. What is your data store for the music files? And what kind of playlist did you try to play?

from slimserver-platforms.

Zardozz avatar Zardozz commented on September 26, 2024

So the playlist that has the problem is at the maximum default possible of 2500 of large files (over 3000 hours).
And it does not occur always (usually when a player reconnects while playing the playlist)

The docker container is hosted on a Synology Nas and the volumes are mounted from it's local btrfs file system.
The version I'm using is Logitech Media Server Version: 8.2.0 - 1627922070

Digging on the internet for a solution gave me.

https://squeezecenter.slimdevices.narkive.com/XrcPhXXI/lms-7-8-0-nightly-too-many-open-files-on-large-playlists-crashes-lms

and later

LMS-Community/slimserver#556

Both those suggest the solution is to increase the open file limit

from slimserver-platforms.

michaelherger avatar michaelherger commented on September 26, 2024

So the playlist that has the problem is at the maximum default possible of 2500 of large files (over 3000 hours).

More than one hour per file? Ok, that's different from my test then. Could you check your NAS, whether it's busy on IO when you try to do this? You could also try to up the limit on the NAS, rather than in the container.

from slimserver-platforms.

Zardozz avatar Zardozz commented on September 26, 2024

The Docker container process limits is below:-

sudo cat /proc/18958/limits
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 31015 31015 processes
Max open files 524288 1048576 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 31015 31015 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us

So the soft limit is 524288

If you exec a terminal in the container, the root user also has a limit of 524288

The CPU and memory usage of the NAS is very low (less than 1% cpu and 11% (of 8Gb) of ram, for all processes )
The disk light hardly flash when it happens, but I don't have any I/O data yet, I've enabled some utilisation logging, so I should be able to get some better data.

from slimserver-platforms.

Zardozz avatar Zardozz commented on September 26, 2024

Some more data

Volume transfer rate
transfer
Volume IOPS
iops
Volume % utilisation rate
volume-util
Memory Usage
memory
CPU usage
cpu-util

I also tried manually hacking the container's limits.conf to via a interactive bash shell to up the nofile limit to 5000 files for the squeezeboxserver user.

This solves the "Slim::Player::Protocols::File::open (101) Error: could not open ..... Too many open files" issue

But I don't think upping the nofile limit really solves the underlying issue with LMS as still is a bit unresponsive while the event happens, but it seems a bit quicker as with the increased nofile limit it is also not spamming the log with error messages.

The old native install of LMS using 7.x never had this problem with this same playlist.

While in LMS-Community/slimserver#556 reporter said the nightly build of 8.2 did not fix the issue for them I might give 8.3 container a try.

from slimserver-platforms.

Zardozz avatar Zardozz commented on September 26, 2024

Tried 8.3 container and I still get the problem with number of open files.

But as a hack work around lms needing more open files for large playlists than the container has configured for the squeezeboxserver user you can create a custom-init.sh script for 8.2 and above of:-

sed -i '$c squeezeboxserver hard nofile 5000' /etc/security/limits.conf

This replaces the last line of the limits.conf (normally blank) with an updated limit

from slimserver-platforms.

uudruid74 avatar uudruid74 commented on September 26, 2024

I can instantly hit the limit using UPNP with certain flac files. Certain flacs end up loading more perl libraries and I bang the 1024 file limit instantly. It may be because I have a lot of devices and both upnp and chromecast bridges, but it all works until I play the right flac, which is ANYTHING from Tidal!

I copied slimserver to /tmp so I could change the limit (used 4096), and the track played right off with no issues.

This is a MUCH needed change!

UPDATE: I spoke too soon. Within about 2 tracks it exhausted the 4096 file limit. lsof shows them all open. Certainly a huge bug here in the UPNP plugin that ulimit can't fix.

from slimserver-platforms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.