Handle Large Number of Concurrent Downloads
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.
Steps to Reproduce:
- 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"}'
- 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.
can you check how your server’s doing when you spam it with stream requests thru htop?
I am not sure what specific details to share, Here's the screenshot after spamming 7 downloads
Also some videos was downloaded incomplete and zero bytes too
you showed the server ip that you redacted in your first message 2 times now
i was the one who redacted it, it literally says in the edit
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
i was the one who redacted it, it literally says in the edit
didn't look at the edits, sorry