'KILLED' NextJS Runtime NixPacks Build

4 months ago

Solved

0 Replies

4 months ago

5bce27d5-0216-4700-b2fc-f3a7f9644cba


4 months ago

It's in a constant loop just restarting, I think?


4 months ago

v2 builder?


4 months ago

No


4 months ago

[phases.build]
cmds = ["pnpm install"]  # we don't build anything, just install dependencies

[start]
cmd = 'pnpm run build && pnpm run start'

nixpacks.toml


4 months ago

been doing this for like 15 minutes


4 months ago

you're ending up installing packages twice, just use true as the build command


4 months ago

sure but i doubt thats the problem


4 months ago

show me the build plan after you've made the change


4 months ago

╔═══════════════════════ Nixpacks v1.31.0 ═══════════════════════╗
║ setup      │ nodejs_18, pnpm-9_x, openssl                      ║
║────────────────────────────────────────────────────────────────║
║ install    │ npm install -g corepack@0.24.1 && corepack enable ║
║            │ pnpm i --frozen-lockfile                          ║
║────────────────────────────────────────────────────────────────║
║ build      │ true                                              ║
║────────────────────────────────────────────────────────────────║
║ start      │ pnpm run build && pnpm run start                  ║
╚════════════════════════════════════════════════════════════════╝

4 months ago

your screenshot, is that deploy or build logs?


4 months ago

Deploy


4 months ago

do you have resource limits set?


4 months ago

Yeah they're pretty low, 1Gb/1 VCPU


4 months ago

remove them please


4 months ago

kk

1333637003039998000


4 months ago

i.e. set to 8/8


4 months ago

done


4 months ago

let me know how that goes


4 months ago

honestly 50/50 chance i'll take off to Vercel at this point. I can't find any options for disabling SSG while maintaining runtime ISR


4 months ago

i wanted private networking to keep latency to my CMS low


4 months ago

that would be within your code


4 months ago

i mean yeah. i'm scouring docs rn but the closest thing I have found is obscure asf


4 months ago

someone else has to have done SSG on Railway without doing some insane setup


4 months ago

i would be surprised if one of the leading features of NextJS is unsupported on Railway


4 months ago

I've done SSG during build and SSR during runtime with Next, granted I didn't connect to a database, but it's possible


4 months ago

i mean i was doing that; i just added a network request to my CMS and now im fucked


4 months ago

aight now it's working


4 months ago

make sure you are using a health check, otherwise we would route traffic to your app while it's still building during runtime


4 months ago

yup that was screwing me immediately


4 months ago

I mean, use a heathcheck even if you weren't doing a build during runtime, it's just good practice 🙂


4 months ago

yea this project and most of mine tend to be hobbyist stuff


4 months ago

this one will eventually be an earner if i do it right


4 months ago

sweet!


4 months ago

part of why i kinda don't want to fool around with Railway right now. idk. i can switch if it's a goner, long build times and no caching is an L, but i can deal. maybe V2 builder will come along in the next few months


4 months ago

the fact that none of this stuff can be solved within NextJS makes me think it's intentional on their part


4 months ago

i wouldn't be considering switching to an edge platform if the build process was more configurable


4 months ago

we will be revisiting build v2 once we are fully on metal


4 months ago

i await


4 months ago

solved methinks


4 months ago

awesome


4 months ago

ur not gonna believe this the healthcheck refuses to work


4 months ago

`Attempt #8 failed with status 404:


4 months ago

your app returned a 404


4 months ago

it needs to return 200


4 months ago

wait i think i'm stupid


4 months ago

it's just a path not a host/port+path combo


4 months ago

correct, it's a healthcheck path


4 months ago

<:lfg:786867302888505364> this is a signal that i need to wind down for the night. brain is off


4 months ago

grab some carrots and ranch and have a chill night


4 months ago

!s


Status changed to Solved brody 4 months ago


'KILLED' NextJS Runtime NixPacks Build - Railway Help Station