Increasing limits on pages for static site generation

Hello! We are building and deploying websites using Cloudflare Pages. The sites are built with Astro (https://astro.build/) and leverage static site generation to create HTML files for the site. Our goal is to generate most or all of the pages of the site, and only dynamically generate select pages with more dynamic components. This site is just a blog, and the page content is generally only housed in our CMS, so if we have to dynamically generate the pages, we could. However, we're looking to migrate an additional ~30 websites into this setup, and many of them have 2 or 3 different systems we will be pulling content from in order to generate the page, so it will be important for us to be able to build static HTML so we don't have multiple backend dependencies to serve a page response. We are running into the limit on files of 20,000 listed here: https://developers.cloudflare.com/pages/platform/limits/. We initially submitted the form to request an increase a couple weeks ago and still haven't heard back. Before we commit to this tech stack for our website hosting, I want to make sure we're not going to hit this limitation on our other websites as well.
Alternatively, we have the ability to store content collections as JSON within the worker. That would allow us to generate the HTML content on a request without hitting the required APIs live. However, this would violate the file size limitations. So multi part question: - Are we using this correctly and thinking about this correctly? Is Pages not designed to have a full website built statically and we need to limit this? - Can we have our limit greatly increased (this website has ~250k pages) or is the way we're planning to deploy not feasible? Thank you! Here is our site info: wonderhowto.pages.dev Deployment ID: 258c7622-f358-4811-920a-5bc79a83be67 Account ID: 6aea4d797b455163dabe49efd8eb466c
Astro
Astro
Astro builds fast content sites, powerful web applications, dynamic server APIs, and everything in-between.
Cloudflare Docs
Limits · Cloudflare Pages docs
Below are limits observed by the Cloudflare Free plan. For more details on removing these limits, refer to the Cloudflare plans ↗ page.
2 Replies
Cyb3r-Jak3
Cyb3r-Jak37d ago
Unfortunately, the file limit and file size limit are both technical limits so cannot be increased.
bwh
bwh2d ago
For 250k static pages, I'd suggest the good old way: A regular web server with nginx or apache, and then just use Cloudflare's proxy in front of that. You can either build directly on the server, or sync your built HTML using rsync. You might also be able to serve this directly out of a Cloudflare R2 bucket for a very low cost (maybe even free)

Did you find this page helpful?