Nextjs deploy intermittently takes minutes to load from url
mrturck
PROOP

a year ago

I have deployed a NextJS app. It builds and deploys without issue. I have applied a custom domain to it with Cloudflare.

Sometimes the site loads and sometimes it doesn't. There are no changes to infra during this time. I experience the same behavior whether I use my custom domain or the railway assigned url.

It seems to happen whenever I haven't visited the url in a few hours. It almost seems like there is a cold start happening.

Any way to debug/fix?

12 Replies

mrturck
PROOP

a year ago

41447385-9804-458f-93fb-0d5524445f70


a year ago

what service?


a year ago

nvm, neither the api or appsloth service have app sleep enabled, so we wouldn't never shut your app down, any code-boot type behavior would be from your application itself


mrturck
PROOP

a year ago


mrturck
PROOP

a year ago

yeah I didn't think so. Even now its taking a while to load the site for me


a year ago

i would have to recommend you implement tracing so that you can find out where the snowness comes from


mrturck
PROOP

a year ago

hmm ok can look into it. Its a basic app and I have no issues locally


a year ago

all is good from our side and at a platform prospective


mrturck
PROOP

a year ago

weird. fwiw it seems to work on vercel


a year ago

they are doing something to monkeypatch away whatever issue you may be running into with your code, on Railway we only run your code as-is


mrturck
PROOP

a year ago

Got it, thanks for looking into things


a year ago

i wish you the best of luck as you debug this!


Loading...