Skip to content
This repository was archived by the owner on Sep 8, 2021. It is now read-only.
This repository was archived by the owner on Sep 8, 2021. It is now read-only.

Playback occasionally stops with "upstream prematurely closed connection..." errors on server #685

@gryphonmyers

Description

@gryphonmyers

Problem description

Periodically when streaming music, the player will cease playback (usually toward the end of a song, before starting the next one). I then see an "ERR_CONTENT_LENGTH_MISMATCH" in the browser console. Looking at server logs, I see many repeated instances of the same sort of error, which I assume are related:

2018/01/25 17:11:11 [error] 15161#0: *46668 upstream prematurely closed connection while reading upstream, client: REDACTED, server: REDACTED, request: "GET /airsonic/rest/stream.view?REDACTED", upstream: "http://127.0.0.1:8080/airsonic/rest/stream.view?REDACTED", host: "REDACTED"

I added

JAVA_ARGS=--server.connection-timeout=-1

to my sysconfig, but that doesn't seem to have had any effect.

System information

  • Airsonic version: 10.1.1-RELEASE – December 16, 2017
  • Operating system: Centos 7
  • Proxy server: Nginx 1.12.2
  • Client: Chrome, DSub

Additional notes

Airsonic is reading from a network drive, so I assume it is sometimes hitting a timeout threshold while waiting for the file read. I'm not finding a read timeout option in the embedded server config options though, and I'm very new to Tomcat / Java so don't know what else to try.

Thanks!!

EDIT:

More info. I am starting to suspect this has something to do with transcoding. It seems there are particular files (tending to be FLACs, is the current theory) that it struggles with. When it hits a file it doesn't like, it will continue to spam errors (the aforementioned ones, in browser console and nginx error log). It will also spam the following lines in the airsonic log:

2018-01-27 10:54:02.920  INFO --- o.a.p.io.PlayQueueInputStream            : gryphon listening to "Animal Crossing - Your Favourite Songs (Original Soundtrack)/03 Daytime In City Square.flac"
2018-01-27 10:54:02.922  INFO --- o.a.p.io.TranscodeInputStream            : Starting transcoder: [/var/airsonic/transcode/ffmpeg] [-i] [/var/airsonic/music/Kazumi Totaka _ Manaka Tominaga _ Shiho Fujii/Animal Crossing - Your Favourite Songs (Original Soundtrack)/03 Daytime In City Square.flac] [-map] [0:0] [-b:a] [192k] [-v] [0] [-f] [mp3] [-]
2018-01-27 10:54:08.750  INFO --- o.a.p.c.StreamController                 : Got HTTP range: 2756762-
2018-01-27 10:54:08.750  INFO --- o.a.p.io.PlayQueueInputStream            : gryphon listening to "Animal Crossing - Your Favourite Songs (Original Soundtrack)/03 Daytime In City Square.flac"
2018-01-27 10:54:08.752  INFO --- o.a.p.io.TranscodeInputStream            : Starting transcoder: [/var/airsonic/transcode/ffmpeg] [-i] [/var/airsonic/music/Kazumi Totaka _ Manaka Tominaga _ Shiho Fujii/Animal Crossing - Your Favourite Songs (Original Soundtrack)/03 Daytime In City Square.flac] [-map] [0:0] [-b:a] [192k] [-v] [0] [-f] [mp3] [-]
2018-01-27 10:54:14.523  INFO --- o.a.p.c.StreamController                 : Got HTTP range: 2756762-

(Some unrelated AudioScrobbler lines omitted)

It will continue spamming this same message every few seconds until I stop it from continuing to attempt playback.

EDIT2:

I have ruled out it being a network drive / timeout issue by copying an album containing offending files onto a local drive, adding that folder as a new Media source, and playing the duplicate version of the album. It fails on the exact same tracks, in the exact same way. I tracked down what looks like a very similar Madsonic issue here, which mentions problems with the audio scanner: http://forum.madsonic.org/viewtopic.php?t=2230

The Madsonic author's suggested fixes seem irrelevant though as those options aren't available in Airsonic.

EDIT3:

I attempted rescanning my library with fast access mode enabled. No change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions