R
Railway15mo ago
.kockie

A way to increase the build timeout

I would like to know if there is a way to increase the build timeout, as I have a very large nextjs application and apparently the build takes longer than allowed.
14 Replies
Percy
Percy15mo ago
Project ID: 5a658472-07a4-461a-920b-f8e47f7ce1ff
Brody
Brody15mo ago
i think the build timeout is 20 minutes, i dont think any nextjs build should come anywhere close to that as far as i know?
.kockie
.kockieOP15mo ago
5a658472-07a4-461a-920b-f8e47f7ce1ff in my case the project has many pages that are generated with getstaticpaths which makes the build take a long time
Brody
Brody15mo ago
how long does the build take if you build locally?
.kockie
.kockieOP15mo ago
10 to 11 hours there are 120000 pages generated by nextjs, I know it seems like the problem is due to a lack of optimization or something like that but this is justified by the fact that it is a bible site and for each chapter there is a page (obviously I didn't do this by hand and Yes, I used the dynamic pages resources)
Brody
Brody15mo ago
I don't work for railway but I can tell you with absolute certainty they will never let the builder run for anywhere near that long you will have to look into different ways of rendering these pages
.kockie
.kockieOP15mo ago
Right, so is there any way for me to bring the built website to the railway?
Brody
Brody15mo ago
of course, you build it somewhere else, commit the build folder to the repo (usually thats not a good idea) remove your build script and only have a start script, that way railway should just run next start that will start the already built app
.kockie
.kockieOP15mo ago
I understood thank you for the help
Brody
Brody15mo ago
but maybe it would be worth it to look into dynamic site building as in when someone loads a page it is built on the fly and cached for the lifetime of the app how long would you say it takes to build one single page?
.kockie
.kockieOP15mo ago
a few milliseconds
Brody
Brody15mo ago
then definitely look into dynamic builds for sure adding a few milliseconds to the request to build the page is absolutely the better option Vs building everything beforehand
.kockie
.kockieOP15mo ago
I think I'll test this
Brody
Brody15mo ago
awsome!
Want results from more Discord servers?
Add your server