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
Project ID:
5a658472-07a4-461a-920b-f8e47f7ce1ff
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?
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
how long does the build take if you build locally?
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)
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
Right, so is there any way for me to bring the built website to the railway?
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
I understood
thank you for the help
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?
a few milliseconds
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
I think I'll test this
awsome!