kagemomiji / airsonic-advanced

airsonic-advanced
GNU General Public License v3.0
175 stars 15 forks source link

[Bug]: Recently Played can get so overwhelmed it can softlock Airsonic and prevent any further playback. #144

Closed DutchComputerKid closed 1 year ago

DutchComputerKid commented 1 year ago

What happened?

Accesing files rapidly can overwhelm the Recently Played iframe or backend, where it can go so out of hand anyone using an external player can no longer access any files unless Airsonic is restarted. With the "now playing" bar frequently getting filled up to the point of hanging Airsonic where only a restart will help.

This problem is especially problematic if a file that cannot be played in an external player is attempted, and the player software skips through the whole playlist quickly, softlocking the server in the process. The CPU's of the server in question will all get pegged to 100% usage until Airsonic is stopped.

Which results in this, often with multiple users cascading. image image

Steps to reproduce

  1. Set Airsonic to External Player
  2. Quickly access the file to overwhelm Airsonic. For instance Foobar2000 will stop playing and can no longer play any files from Airsonic.
  3. The recently played bar will get fuller and fuller until Airsonic is restarted and all goes back to normal. Until any external player starts to read the files 'too fast'for any reason.
  4. Recently Played is overloaded, and players like Foobar2000 will get stuck trying to start playback until a network error occours.

Version

Edge

Version Detail

11.0.2-SNAPSHOT.20230307000030

Operating System

Debian 11

Java Version

Java 17.0.6 OpenJDK AMD64

Database

Other

DB Detail

HSQLDB

Configuration paramter

/usr/lib/jvm/java-1.17.0-openjdk-amd64/bin/java -Xmx2048m -Dairsonic.home=/var/airsonic -Dserver.port=4534 -Dserver.use-forward-headers=true -jar /var/airsonic/airsonic.war

Proxy Server

NGINX

client detail

Firefox, Pale Moon, Chrome, all of them.

language

English

Relevant log output

No response

DutchComputerKid commented 1 year ago

Played for a day or so, this happens randomly too. Clicking rapidly on the song inside the m3u or m3u itself just speeds up the problem. External Player can hang Airsonic at any moment, but why, I'm not sure.

kagemomiji commented 1 year ago

@DutchComputerKid I think this is the same problem as #87.

DutchComputerKid commented 1 year ago

Oh indeed, its the exact same problem. This one's been an Airsonic problem for a year or more. Should I close this then?