Handle Large Number of Concurrent Downloads #364

Open
opened 2025-11-09 09:47:30 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @iRajatDas on GitHub (Jul 23, 2024).

I encountered an issue with the download links generated by the API. When I create 7 download links and attempt to access the 7th link, it keeps loading in the browser tab until the previous 6 downloads complete.

image

Steps to Reproduce:

  1. Create 7 download links using the following command:

Yes, the below curl will work until sometime for testing

curl 'http://<redacted>:9000/api/json' \
  -H 'accept: application/json' \
  -H 'content-type: application/json' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' \
  --data-raw '{"url":"https://www.youtube.com/watch?v=LXb3EKWsInQ","vQuality":"4320","filenamePattern":"basic"}'
  1. Click on the 7th download link.

Expected Behavior:

The 7th download link should start downloading the video immediately without waiting for the previous 6 downloads to complete.

Actual Behavior:

The 7th download link keeps loading in the browser tab until one of the previous 6 downloads complete.

Additional Information:

  • OS: macOS
  • API Endpoint: http://[redacted]:9000/api/json
  • Server Configuration: DigitalOcean droplet with 25GB SSD storage and 1 GB RAM running Ubuntu 22.02
  • Using PM2 Manager for running the API
  • Node 18

I know the server is not that strong, but I did not find the best documentation for it either.

Please let me know if any additional information is needed.

Originally created by @iRajatDas on GitHub (Jul 23, 2024). I encountered an issue with the download links generated by the API. When I create 7 download links and attempt to access the 7th link, it keeps loading in the browser tab until the previous 6 downloads complete. <img width="1680" alt="image" src="https://github.com/user-attachments/assets/e5c21453-05ab-4c60-ba0c-1630c50b02b0"> ## Steps to Reproduce: 1. Create 7 download links using the following command: > Yes, the below curl will work until sometime for testing ```sh curl 'http://<redacted>:9000/api/json' \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' \ --data-raw '{"url":"https://www.youtube.com/watch?v=LXb3EKWsInQ","vQuality":"4320","filenamePattern":"basic"}' ``` 2. Click on the 7th download link. **Expected Behavior:** The 7th download link should start downloading the video immediately without waiting for the previous 6 downloads to complete. **Actual Behavior:** The 7th download link keeps loading in the browser tab until one of the previous 6 downloads complete. **Additional Information:** - OS: macOS - API Endpoint: http://[redacted]:9000/api/json - Server Configuration: DigitalOcean droplet with 25GB SSD storage and 1 GB RAM running Ubuntu 22.02 - Using PM2 Manager for running the API - Node 18 I know the server is not that strong, but I did not find the best documentation for it either. Please let me know if any additional information is needed.
GiteaMirror added the instance hosting help label 2025-11-09 09:47:30 -06:00
Author
Owner

@wukko commented on GitHub (Jul 23, 2024):

can you check how your server’s doing when you spam it with stream requests thru htop?

@wukko commented on GitHub (Jul 23, 2024): can you check how your server’s doing when you spam it with stream requests thru `htop`?
Author
Owner

@iRajatDas commented on GitHub (Jul 23, 2024):

I am not sure what specific details to share, Here's the screenshot after spamming 7 downloads
image

Also some videos was downloaded incomplete and zero bytes too

@iRajatDas commented on GitHub (Jul 23, 2024): I am not sure what specific details to share, Here's the screenshot after spamming 7 downloads <img width="1680" alt="image" src="https://github.com/user-attachments/assets/0f60bff7-7701-4fec-9138-f9bb38e5acea"> Also some videos was downloaded incomplete and zero bytes too
Author
Owner

@ihatespawn commented on GitHub (Jul 23, 2024):

you showed the server ip that you redacted in your first message 2 times now

@ihatespawn commented on GitHub (Jul 23, 2024): you showed the server ip that you redacted in your first message 2 times now
Author
Owner

@wukko commented on GitHub (Jul 23, 2024):

i was the one who redacted it, it literally says in the edit

@wukko commented on GitHub (Jul 23, 2024): i was the one who redacted it, it literally says in the edit
Author
Owner

@iRajatDas commented on GitHub (Jul 23, 2024):

i was the one who redacted it, it literally says in the edit

Please let me how to fix this issue or the server configurations/requirements, thanks

@iRajatDas commented on GitHub (Jul 23, 2024): > i was the one who redacted it, it literally says in the edit Please let me how to fix this issue or the server configurations/requirements, thanks
Author
Owner

@ihatespawn commented on GitHub (Jul 23, 2024):

i was the one who redacted it, it literally says in the edit

didn't look at the edits, sorry

@ihatespawn commented on GitHub (Jul 23, 2024): > i was the one who redacted it, it literally says in the edit didn't look at the edits, sorry
Sign in to join this conversation.