-
Notifications
You must be signed in to change notification settings - Fork 811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: input stream: Status code: 429 #444
Comments
Same thing is happening to me! |
What seems to happen is, like you im using a vps, it stops working after like a few requests. |
this status means that too many requests are being made too quickly I recently updated miniget, the http library that this library uses. the reconnect logic was refactored and moved around. so at first i thought that might be the issue. but in #445, @encloinc is using ytdl-core@0.29.2, which uses the old version of miniget. @encloinc, can you run could also be that youtube changed their website, adding more rate limiting. |
|
I dont know if its a rate limiting issue though, because when I restart the vps it works again for a few requests. Its quite weird. (And I wouldnt be like surpassing the limit too much, my vps makes no more than a request every 3 minutes) |
if youtube is rate limiting requests more, one solution can be to
ok thanks. that means this issue is originating from a change from youtube, rather than the recent update.
it's working again because there was some time when your vps didn't make any requests, not because it was restarted.
is this for a bot that's shared in a server? does it get a lot of requests? |
It is a youtube-mp3 converter site, and it doesnt really. Also when I restart the vps it restarts in like 5 minutes. All I do is restart the script. |
Same here, And I'm on an older version. Def a YouTube change. Hopefully there is a workaround |
Yeah. |
Just started happening as well for me, i use this for a personal player and i'm the only user |
Yeah it definitley isnt related to actual rate limits I think. |
Same here, we're fucked up. |
I have friends seeing some issues but much less then me, however they use Lavaplayer. Additionally they also have US servers, mine are EU, might just mean it's not deployed globally yet. Some very basic testing proves they are cutting off requests pretty quickly. I'm wondering if they are detecting ytdl-core specifically somehow. Or maybe the user agent etc. I'll be getting some sleep then testing this pretty extensively I'll keep you updated to my findings |
Google/YouTube has blocked my whole /64 IPv6 subnet due to one IPv6 address which I deployed recently to my invidious instance. The IPv4 address worked since a few months and is still working. Only IPv6 is blocked. What provider do you use? I use Hetzner. Maybe it is something provider specific? |
It looks like just a new, more strict, throttling. |
I added some request caching (espacially for the video info) to my code - now 60% of servers are up again. |
I'm still receiving this issue, and my program is barely even using any requests (maybe 50 In total today). Does anyone know if this is provider specific? I'm not getting this issue on my local machine at all, just on my VPS. |
I fixed it by deploying different instances of the actual part of the code that downloads the youtube mp3's and having the main server pipe into one of these instances (at random). I made 15 of them, this seems its the only way to get past this atm. |
You did it from 1 IP? |
I dont know if the service uses 1 ip, they do it with "deployments". Either
way it seemed to fix it.
…On Thu, Jul 11, 2019 at 9:23 AM m.h4ck ***@***.***> wrote:
I fixed it by deploying different instances of the actual part of the code
that downloads the youtube mp3's and having the main server pipe into one
of these instances (at random). I made 15 of them, this seems its the only
way to get past this atm.
You did it from 1 IP?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#444?email_source=notifications&email_token=ADI2LIVATHASWBIGI6FSZFLP64665A5CNFSM4H7KBMAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZW3S2Y#issuecomment-510507371>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADI2LIWPFUC7V5QXG7D5LJTP64665ANCNFSM4H7KBMAA>
.
|
Anybody else had figured out smth. ? Interesting questions are: Haven't figured it out now. |
@mh4ck I used 2 proxies (not rotating, static ip) last night for two different instances that were both blocked . But they seemed to work fine and did not get blocked even with high parallel traffic and still seem to be working. |
Where you got the proxies from? I bought today a lot of new ip's but all got blocked now. |
@mh4ck It's a local service, so can't reveal that. But I have added more just to be safe and so far it has resolved the issue. What VPS service are you using? I tried adding another instacne and that was blocked instantly. Maybe it's targeting spefic vendors? |
See also ytdl-org/youtube-dl#21729. Similar to what @Perflyst mentioned I believe this is only an issue when connecting to YouTube over IPv6. If possible, you may try disabling it or force connecting over IPv4. Unfortunately I'm not sure how easy that is only using this library, but it may be possible to disable it depending on cloud provider or some other configuration. |
I'm only using IPv4 and still got this error after a few requests. |
Guys guys guys please fix this issue as fast as possible. I have worked so hard on my music app from months if this thing happens my all work will be wasted @fent |
I guess there is nothing programmatically to do. |
@mh4ck so we are fucked up now. 😭 |
This is happening to me too, It's pretty annoying for me and other people. |
I tried using another lib (LavaLink) but I still ran into the 429 issue. |
@fent Can you give a brief explaination how fent/node-miniget@1ed8467 solves this issue? Does youtube send retry-after header? And how slow would it be when it's rate limited? Thanks |
I don't know if youtube does, because I was never able to replicate it. but even if they don't, miniget will still retry the request. |
@fent Thanks. |
@fent so basically if I change this file it will work? fent/node-miniget@1ed8467 |
This still occurs, and retrying doens't help since all requests begin returning 429. I'm not sure this should be closed. edit, nevermind, I see this issue is still open here #635 |
have you tried using cookies?
I've kept that opened to remind myself to add throttling |
Yes, cookies worked, thanks. |
How long the cookies work, when they expire? Or they don't? Did anyone got experience with that? |
I would guess they would work for a few months; i.e. however long your youtube login remains valid. |
I just tried cookies again but can't get it to work. Do you use the same IP for the cookie wich you used to create the cookie? I generated it on my local pc and used it on my server - now i get the following error: I'm pretty sure to use the right Cookie and identity-token... made xss attacks 10 years ago and normaly know what i'm doing haha...
|
idk about your specific use case and what your
Where your cookie is a string (not an object) that includes |
I've also gotten it to work with oauth, which imo is more versatile since it would be awkward to ask users to copy & paste cookies from their browser (unless there's an automated way of retrieving cookies I don't know about?)
|
what's all you need for oauth? i'd be interested in adding another example to the repo |
I use oauth for 2 things in my app.
|
I am also getting same error any solutions? |
I'm getting 429 error as well. I hosted on google cloud function to get video info from Youtube using ytdl.GetBasicInfo, it seems like it happens every couple days, the last time it happened it made total of 9 requests before throwing the error. Though when I look at the log it seems like for every request it actually makes 2 request (one returning 204 preflight and one returning 200), not sure if this would be an issue? Anyone else facing similar issues? |
Did you guys (@notadevps & @cchen028) try using cookies or oauth token? |
yea i tried using cookies but it didn't worked |
Did your cookie look like: |
if you got your cookies from |
Thanks for the prompt responses. Yes I have added the cookies and so far it is still working (Will give it a couple more days). The reason I'm asking is because it works fine on my compute engine which runs 24/7 but not on the cloud functions. The 3 failures (err 429) I've encountered on cloud functions follow a similar pattern which is after the functions have been idled for a while and on the initial request it would fail until I re-deploy the function again. Just figured if anyone with a deeper understanding would know the potential cause behind this? I'm also trying to keep the functions alive to see if this will solve it |
I'm getting the 429 status code too, sadly. Error: input stream: Status code: 429
at ClientRequest.<anonymous> (/home/container/node_modules/miniget/dist/index.js:150:31)
at Object.onceWrapper (events.js:417:26)
at ClientRequest.emit (events.js:310:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:603:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
at TLSSocket.socketOnData (_http_client.js:476:22)
at TLSSocket.emit (events.js:310:20)
at addChunk (_stream_readable.js:286:12)
at readableAddChunk (_stream_readable.js:268:9)
at TLSSocket.Readable.push (_stream_readable.js:209:10) Are there any fixes for this? |
Everything was working fine earlier today and yesterday until all of a sudden I started getting this error multiple time in my log file. I've never had a 429 response with this lib before. (Edit: This issue only happens on my VPS, it doesn't happen on my local machine.)
Running ytdl-core@0.29.3
The text was updated successfully, but these errors were encountered: