Sudden onset of ENOTFOUND when trying to access from fetch

Since yesterday (where I didn’t make any changes to the container image), whenever I spin up a machine with docker image, and try to access it, I get ENOTFOUND

[cause]: [Error: getaddrinfo ENOTFOUND szqyxfya2jyu2nuglben1.fly.dev] {
errno: -3008,
code: ‘ENOTFOUND’,
syscall: ‘getaddrinfo’,
hostname: ‘szqyxfya2jyu2nuglben1.fly.dev
}

Accessing it from the browser works. Any ideas? I didn’t change anything.

EDIT:

It seems like it resolves after a few minutes and becomes accessible, but it wasn’t like that before, previously it became available WAY MORE faster..what could it be?

where are you running the code that prints this error?

Vercel, but it happens locally too.

It’s super odd -
If I “revalidate” (access that url) from postman web, then try to re-run this fetch from Vercel/my local machine - it works.

Any ideas? @lillian

I was trying to debug this the entire day, we changed nothing in our infra/code, just started happening out of nowhere

sorry, I didn’t have time to look at this today. it might be possible that there is some unusual delay introduced in our infra, but I don’t immediately see anything.

it’s possible that you are querying the domain just slightly too fast, and the few minutes that it takes to work again is your resolver caching a negative response. could you try sleeping a short amount of time between allocating IPs and resolving the domain?
that might fix your issue.

Just found the cause :sob:

I am querying the domain 100+ times to retrieve files (its a server the expose an api) and I guess there’s a rate limit / I am being blocked for doing that :expressionless_face:

Could that be the problem?

it shouldn’t be! you can query your app as much as you want, and if there were ratelimits they wouldn’t show up as DNS errors like that.

Well, it got resolved when I remove that code. I can dm it you so you can maybe take a look, but yeah that’s super weird :open_mouth:

weird! sure, send me an email and I’ll see if I notice anything. or if you have a a support plan, the folks over there should be able to help.