Exceeding 3 MiB limit
Anybody else had this issue? My Nextjs site is exceeding 3 MiB limit for Cloudflare Worker.
Github https://github.com/SuperJakov/Canvas-Flow-Studio
Sometimes it barely gets through the limit, but usually it fails. I want to be
always under the limit.
Exact logs:
GitHub
GitHub - SuperJakov/Canvas-Flow-Studio: Canvas Flow Studio (formerl...
Canvas Flow Studio (formerly AI Flow Studio) is a website which allows users to create whiteboards. It has a nice drag & drop UI. Users can use nodes and connect them to generate an AI work...
2 Replies
Is it maybe related to me using some dependencies in convex/ (backend) while not using them in the src/ (frontend)?
The limit is after compression, so its impacted a lot but how "compressable" your code is.
Realistically you're going to have to reduce the amount of dependencies you have or upgrade to the paid plan. If you can't reduce the size of your worker or expect it to keep growing, its $5 USD/month for the paid plan that will let you use 10mb.
Alternatively if you have things you can split, you could create multiple workers and use service bindings to have them talk to each other, which will reduce the size of the individual workers.