[GH-ISSUE #6] Got response code "500" nternal server error during a burst files uploading #4

Closed
opened 2026-02-27 22:07:29 +03:00 by kerem · 7 comments
Owner

Originally created by @ccyang2019 on GitHub (Apr 14, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/6

If I use a loop to upload files in a folder, it will random get response "500" error during file uploading. Need to wait some time (~ 1mins) , and resend X-Goog-Upload-Command "start", "upload, finalize" request after file uploading got response 500 error. But this not a smart solution and waste upload bandwidth.
I don't know if "OPTION" request is used to communicate with server to check if server is ready for a Upload command.

Originally created by @ccyang2019 on GitHub (Apr 14, 2020). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/6 If I use a loop to upload files in a folder, it will random get response "500" error during file uploading. Need to wait some time (~ 1mins) , and resend `X-Goog-Upload-Command` "start", "upload, finalize" request after file uploading got response 500 error. But this not a smart solution and waste upload bandwidth. I don't know if "OPTION" request is used to communicate with server to check if server is ready for a Upload command.
kerem closed this issue 2026-02-27 22:07:30 +03:00
Author
Owner

@sigma67 commented on GitHub (Apr 14, 2020):

That is very strange. In-browser, there is no wait time between uploads. Can you post some details regarding your request sequence and the responses? I.e. 3 successful uploads, then an error?

<!-- gh-comment-id:613573664 --> @sigma67 commented on GitHub (Apr 14, 2020): That is very strange. In-browser, there is no wait time between uploads. Can you post some details regarding your request sequence and the responses? I.e. 3 successful uploads, then an error?
Author
Owner

@ccyang2019 commented on GitHub (Apr 14, 2020):

My script is very simple. Just a loop to call upload_song() to upload songs in a folder.
Got Response [500] randomly during a burst uploading.

original w/o retry:
fail1

add retry:
fail2
another fail w/ retry:
fail3

<!-- gh-comment-id:613727514 --> @ccyang2019 commented on GitHub (Apr 14, 2020): My script is very simple. Just a loop to call `upload_song()` to upload songs in a folder. Got `Response [500]` randomly during a burst uploading. original w/o retry: ![fail1](https://user-images.githubusercontent.com/47751514/79282446-ce2fb680-7ee7-11ea-9b45-92381cf6c04b.png) add retry: ![fail2](https://user-images.githubusercontent.com/47751514/79282469-dbe53c00-7ee7-11ea-844b-4b2359776070.png) another fail w/ retry: ![fail3](https://user-images.githubusercontent.com/47751514/79282998-29ae7400-7ee9-11ea-9998-8dcd34e5cce8.png)
Author
Owner

@sigma67 commented on GitHub (Apr 15, 2020):

That's helpful, thank you. It seems that after 13 songs the processing queue is full and the server does not respond anymore. I'll have to reproduce this myself to see what I can do about it.

<!-- gh-comment-id:613895562 --> @sigma67 commented on GitHub (Apr 15, 2020): That's helpful, thank you. It seems that after 13 songs the processing queue is full and the server does not respond anymore. I'll have to reproduce this myself to see what I can do about it.
Author
Owner

@allanin commented on GitHub (Jun 24, 2020):

@sigma67 did you change something? I was able to upload 77 mp3s with a simple for loop without getting a response 500

<!-- gh-comment-id:648709745 --> @allanin commented on GitHub (Jun 24, 2020): @sigma67 did you change something? I was able to upload 77 mp3s with a simple for loop without getting a response 500
Author
Owner

@sigma67 commented on GitHub (Jun 24, 2020):

No, not recently. Must be a server side change or fix. I guess we can close this issue then?

<!-- gh-comment-id:648721213 --> @sigma67 commented on GitHub (Jun 24, 2020): No, not recently. Must be a server side change or fix. I guess we can close this issue then?
Author
Owner

@allanin commented on GitHub (Jun 24, 2020):

To be sure I uploaded 400 mp3s and checked if all were uploaded.

There was no one missing.

Maybe it has something to do with the upload speed, so that @ccyang2019 uploaded more mp3s which had to be processed?

<!-- gh-comment-id:648952620 --> @allanin commented on GitHub (Jun 24, 2020): To be sure I uploaded 400 mp3s and checked if all were uploaded. There was no one missing. Maybe it has something to do with the upload speed, so that @ccyang2019 uploaded more mp3s which had to be processed?
Author
Owner

@sigma67 commented on GitHub (Jun 24, 2020):

That is possible. Can you monitor the upload bandwidth of your script and report back? Perhaps we can establish an upper limit.

<!-- gh-comment-id:649038408 --> @sigma67 commented on GitHub (Jun 24, 2020): That is possible. Can you monitor the upload bandwidth of your script and report back? Perhaps we can establish an upper limit.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#4
No description provided.