-
Notifications
You must be signed in to change notification settings - Fork 0
Can't play songs larger than 32 MB #10
Comments
https://support.google.com/chrome/thread/25510119?hl=en has some discussion about how Chrome requests media files. It sounds like the initial full-range request may just be used to check whether the server supports range requests, and might be aborted before the download finishes. However, this doesn't exactly match what I'm seeing. With a smaller file, the server returns a 206 with Maybe Chrome only aborts the initial request if the file is huge (e.g. video). |
Sigh. As best as I can tell, Chrome's networking/media-fetching code is buggy and inefficient, and devtools and/or App Engine logging are full of lies. When I try to play a 29127465-byte file, dev tools claims that Chrome is sending a single request with I can seek forward to the end of this file (48:32) without any more requests being made, but when I seek backward devtools shows a bunch of new requests being sent:
All of those but the last one are red, which I assume is Chrome's way of saying it aborted them. The last one is shown as successful, with the server returning a 206 with In the App Engine logs, I can see that all of those results actually got sent to the server and resulted in big reads from Cloud Storage. |
When I play a song with size 55596839, Chrome just shows a single request for range 15 minutes later, Chrome shows another request, this one for Cloud Logging's show-new-logs-when-scrolling-down behavior is super-buggy and often appends old logs instead of new ones, and App Engine requests often get split across multiple top-level entries, some of which are missing trace IDs, so it's really hard to figure out what's actually going on here. |
Update the /song_data endpoint to send partial ranges for files that are larger than ~32 MB, since App Engine just returns a 500 error for responses larger than that.
Tell the browser to download entire audio files immediately. Chrome looks like it already sends a bunch of duplicate range requests (see #10), so I'm hoping this will at least convince it to only send a single request.
When we receive a 206 response that doesn't include the full song (because App Engine doesn't support responses larger than 32 MB), automatically kick off another request to get more data. See derat/nup#10.
I think that this works in the web and Android clients now. |
Requests to the
/song_data
endpoint for large files result in 500 errors.The client sends a request with
Range: bytes=0-
. In the App Engine logs, I can see that the server dutifully reads and returns the data without reporting any problems, e.g.Creating reader for bucket:song.mp3 with size 55596839
. However, dev tools shows that Chrome is getting back a 500.Per https://cloud.google.com/appengine/docs/standard/go111/how-requests-are-handled:
I don't understand what the "does not apply" clause is referring to. Is it not talking about App Engine anymore, and instead referring to requests to a Cloud Storage endpoint? The linked page doesn't have any useful information.
The text was updated successfully, but these errors were encountered: