'KILLED' NextJS Runtime NixPacks Build

2 years ago

(no markdown available for this content)

Solved

51 Replies

2 years ago

5bce27d5-0216-4700-b2fc-f3a7f9644cba


2 years ago

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


2 years ago

v2 builder?


2 years ago

No


2 years ago

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

[start]
cmd = 'pnpm run build && pnpm run start'
```nixpacks.toml


2 years ago

been doing this for like 15 minutes


2 years ago

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


2 years ago

sure but i doubt thats the problem


2 years ago

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


2 years 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                  ║
╚════════════════════════════════════════════════════════════════╝

2 years ago

your screenshot, is that deploy or build logs?


2 years ago

Deploy


2 years ago

do you have resource limits set?


2 years ago

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


2 years ago

remove them please


2 years ago

kk

1333637003039998053


2 years ago

i.e. set to 8/8


2 years ago

done


2 years ago

let me know how that goes


2 years 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


2 years ago

i wanted private networking to keep latency to my CMS low


2 years ago

that would be within your code


2 years ago

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


2 years ago

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


2 years ago

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


2 years 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


2 years ago

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


2 years ago

aight now it's working


2 years ago

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


2 years ago

yup that was screwing me immediately


2 years ago

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


2 years ago

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


2 years ago

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


2 years ago

sweet!


2 years 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


2 years ago

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


2 years ago

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


2 years ago

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


2 years ago

i await


2 years ago

solved methinks


2 years ago

awesome


2 years ago

ur not gonna believe this the healthcheck refuses to work


2 years ago

`Attempt #8 failed with status 404:


2 years ago

your app returned a 404


2 years ago

it needs to return 200


2 years ago

wait i think i'm stupid


2 years ago

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


2 years ago

correct, it's a healthcheck path


2 years ago

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


2 years ago

grab some carrots and ranch and have a chill night


2 years ago

!s


Status changed to Solved brody over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...