#30,000 pages statics
64 messages · Page 1 of 1 (latest)
Hi @dull spoke, Are you hitting the build time limit of 45mins?
What is the error/log you're getting?
CSR when you render page on client using JS which may negatively impact SEO
SSR which renders page on server and serves ready page that might be slower if there are intensive stuff going on
Can you tell more about your use case?
That stopped at 45 minutes.
Does Netlify have the same limitation?
I wish it was just SSG
Are you using getStaticPaths? I agree with Herob we need more info about your situation
That's right, I'm using getStaticPaths.
Can you show us what your getStaticPaths function looks like or share a repo
If SSR won't do, try CSR (client-side rendering)
And load JSON into your app (after modifying it)
CSR is not an option for me because of SEO.
The performance using SSR is great, but I would really like to use it as an SSG.
It would be an option at the moment. But I don't remember if Vercel allows deployment this way.
But in the future I will need to implement ISR.
What happens when you build in dev? and out of curiousity what was the error from vercel deployment logs?
Build Failed
Your deployment's build step did not complete within the maximum of 45min
==========
Enjoying the conversation, Astro doesn't have an on-demand option like NextJs, right?
https://nextjs.org/docs/app/building-your-application/caching#on-demand-revalidation
Time-based only
For the amount of pages you have I think SSR is your option. The build time is just too big
I thought.
https://vercel.com/docs/build-output-api/v3/features#on-demand-incremental-static-regeneration-isr
So I think that would be the way out.
It will generate statically on demand, so it will deliver SSR from the second access.
And I will be able to update on demand, using ISR.
In other words, at build time it will be SSR, but the next accesses will be delivered SSG. Am I correct in my analysis?
Looking into this...
I have to admit I don't know much on ISR, but it does seem doable. Was reading the following article on NextJS: https://www.smashingmagazine.com/2021/04/incremental-static-regeneration-nextjs/#incremental-static-regeneration-isr
Not sure if it'd work the same way for Astro. Maybe do a new post on implementing ISR in Astro with your specific use case
I think you might talk about this 🤔
I know ISR well in NextJS, I have a project with more than 3 million pages.
I'm doing this 30,000 page MVP to test ASTRO and maybe migrate this big 3 million page project.
astro on vercel has isr
My only question. What in the world kind of site has 3 million pages?
Welcome to Brazil.
By the way, I was wrong, it's 5 million.
Wow
How often are these pages changed? Using SSR + Cache Control headers is a middle ground, but if you have heavy traffic and a short TTL the cost of serverless might not work
@orchid plover
Are you using codegen to create the static paths @dull spoke ? or how are you doing that?
Infrequently, but with a lot of traffic. Hence the search for static, but with the possibility of updating on demand in the future.
So at the moment I'm not using SSG but SSR, passing only a few paths. The rest will generate on demand.
I don't know Codegen, but what would be your question, if I have any tips I'll let you know. Call me on private.
This was an attempt to use only SSG by passing all urls to be built at build time. In the case where the project is an MVP, I built this json myself locally.
I have the CSV of all the slugs and I created a script to generate this json.
were you able to get the full build to run locally?
Yes, it took 4 hours for 30 thousand pages.
So just to reiterate, what is your main issue, the time it takes or it's not working on vercel or something?
how long is the typical per-page rendering duration?
for context, rendering is one-half of process, the other (more inefficient) half is compiling md, mdx, jsx, astro into css and javascript
My expectation was to have published all static pages at the time of construction in Vercel. But Vercel has limitations (I only tested it on the Free plan).
This week I'm going to try the paid plan on Netlify.
I'm curious to know what astro plugins/extensions you're using to get the build time so high
I now looked at the terminal logs and it takes an average of 400ms per page.
fazendo chamada no supabase
what does your page template and astro config look like?
I wonder if building locally and sending these pages manually would do 🤔
Of course, if it's possible with vercel
yes, vercel cli has a --prebuilt flag