LavaPlayer YouTube request starting to get rate limited
See original GitHub issueHi
I’ve recently started to run into an issue where YouTube requests made by lava player start running into a 429 TooManyRequests response. This keeps happening even when I stop the bot and start a private instance with almost no traffic. The only way to fix this seems to be by changing the server instance’s public IP, then all requests work again even under peak traffic until they don’t and then the cycle repeats. Is that part of YouTube trying to shutdown music bots?
[ERROR] 2019-10-15 08:59:25.572 [lava-daemon-pool-info-loader-2-thread-1] UrlAudioLoader - lavaplayer threw an exception while loading track https://www.youtube.com/watch?v=YLHpvjrFpe0
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Loading information for a YouTube track failed.
at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:43) ~[lavaplayer-1.3.22.jar:?]
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadTrackWithVideoId(YoutubeAudioSourceManager.java:233) ~[lavaplayer-1.3.22.jar:?]
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadFromUrlWithVideoId(YoutubeAudioSourceManager.java:323) ~[lavaplayer-1.3.22.jar:?]
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadFromMainDomain(YoutubeAudioSourceManager.java:260) ~[lavaplayer-1.3.22.jar:?]
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadNonSearch(YoutubeAudioSourceManager.java:330) ~[lavaplayer-1.3.22.jar:?]
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItemOnce(YoutubeAudioSourceManager.java:189) ~[lavaplayer-1.3.22.jar:?]
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItem(YoutubeAudioSourceManager.java:128) ~[lavaplayer-1.3.22.jar:?]
at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:437) ~[lavaplayer-1.3.22.jar:?]
at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:419) ~[lavaplayer-1.3.22.jar:?]
at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:218) ~[lavaplayer-1.3.22.jar:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.io.IOException: Invalid status code for video info response: 429
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.determineFailureReason(YoutubeAudioSourceManager.java:401) ~[lavaplayer-1.3.22.jar:?]
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.getTrackInfoFromMainPage(YoutubeAudioSourceManager.java:390) ~[lavaplayer-1.3.22.jar:?]
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadTrackWithVideoId(YoutubeAudioSourceManager.java:201) ~[lavaplayer-1.3.22.jar:?]
... 12 more
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
How are the big music bots able to use YouTube as their ...
Hi, I've been working on a 24/7 music bot for quite some time and I've noticed that some of my users have been...
Read more >The great music bot apocalypse on October - Medium
The issue of both bots and websites such as youtubetomp3 (which rely on automatic requests to youtube to get songs) was left mostly...
Read more >Discord4J / Discord4J Download - JitPack
Official - Automatic rate limiting, automatic reconnection strategies, ... Discord4J 3.2.x includes simpler and more powerful APIs to build requests, ...
Read more >Google has killed Discord's best music bot | Hacker News
I'd take a bet that the email chain that began the process to send Groovy the C&D started with one of the companies...
Read more >com.sedmelluq.discord.lavaplayer.track.AudioPlaylist Example
YOUTUBE ); } /** * Checks if the search request is directed at YouTube and if we're * still on a cooldown due...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Checking the linked PR leads you here.
Thanks, I’ll try to find out how to use this IP rotation.