R
Railway

✋|help

A way to increase the build timeout

K.kockie9/19/2023
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.
BBrody9/19/2023
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?
K.kockie9/19/2023
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
BBrody9/19/2023
how long does the build take if you build locally?
K.kockie9/19/2023
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)
BBrody9/19/2023
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
K.kockie9/19/2023
Right, so is there any way for me to bring the built website to the railway?
BBrody9/19/2023
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
K.kockie9/19/2023
I understood
thank you for the help
BBrody9/19/2023
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?
K.kockie9/19/2023
a few milliseconds
BBrody9/19/2023
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
K.kockie9/19/2023
I think I'll test this
BBrody9/19/2023
awsome!

Looking for more? Join the community!

Recommended Posts
TLS handshake timeout during transition from build to deployMy sites have been failing to deploy the whole day + yesterday. I see that this was an issue multiplsave file on file system not foundi've create api to save file to public files after i upload new file on railway host, 404 where i Can I create an environment from a secondary branch of a GitHub repository?Hello, I have a Node.js web app on Railway, and I'm looking for a way to create a second instance fServer becomes unresponsiveCan someone please help me figure out what occurred Saturday? Our production site was not accessibleProject with cron job aways skippedWhy my project nevers run with cronMaximum of 4 volumes per project?Heya 🌞 I have several services and would need to attach another volume to one of these but it get aAny way to skip redeployment if github ci is skipped?Here's what I see on dashboard, railway is granted all accesses in my org on github. On github I caBuild Error after RedeployRecently, I've been facing a weird error whenever I redeploy my railway instance from the dashboard.Restarting database not working.My postgres database wont restart. All data is not modifiy after restaring it.Adding support for python with isolated-vm npm packageHello, I am using a project that requires the isolated-vm npm package (https://www.npmjs.com/packageListmonk; Static FilesNot sure why my post was deleted, but here it is again: Hello, I've deployed Listmonk on Railway, ConcurrencyWill concurrent requests to a single endpoint work? And where would the logs appear for each individProblem with Flask-Caching/ RedisI'm trying to setup a simple caching mecanism to my Plotly Dash (Flask) application deployed to railWorker Killed IssueI'm getting the attached error when I try to request my app from a React frontend, whereas I wasn't Need help with deploymentSubject: Seeking Guidance on Loading Environment Variables in Railway for My Go API Deployment Hi ebun: command not foundHello, I'm trying to migrate my project to bun to make TS easier, and I'm when deploying, the logs Metrics on Number of Web RequestsI just deployed a web API and would like to keep track of the number of requests made to the API. DoIs there a timeout on my api functions when deploying a nextjs app?I coudnt find anything about this on google or the docs, Thanks for helpingI have problems with the database when I do a deploy.I have a mongo DB database that is connected to a node js, to connect to mongo I use the url that moI have problems with the database when I do a deploy.I have a mongo DB database that is connected to a node js, to connect to mongo I use the url that mo