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:
18:43:26.460 Total Upload: 14310.89 KiB / gzip: 3064.17 KiB
18:43:30.343 Your Worker has access to the following bindings:
18:43:30.343 Binding Resource
18:43:30.344 env.ASSETS Assets
18:43:30.344
18:43:30.396 ✘ [ERROR] Your Worker failed validation because it exceeded size limits.
18:43:30.397
18:43:30.397
18:43:30.397 A request to the Cloudflare API (/accounts/fae9830f4778af657260ae8a9aa52308/workers/scripts/canvas-flow-studio/versions) failed.
18:43:30.397 - Your Worker exceeded the size limit of 3 MiB. Please upgrade to a paid plan to deploy Workers up to 10 MiB. https://dash.cloudflare.com/fae9830f4778af657260ae8a9aa52308/workers/plans [code: 10027]
18:43:30.397 To learn more about this error, visit: https://developers.cloudflare.com/workers/platform/limits/#worker-size
18:43:30.397 Here are the 5 largest dependencies included in your script:
18:43:30.397
18:43:30.397 - .open-next/server-functions/default/handler.mjs - 13350.17 KiB
18:43:30.397 - .open-next/middleware/handler.mjs - 780.69 KiB
18:43:30.397 - .open-next/.build/durable-objects/queue.js - 12.17 KiB
18:43:30.397 - .open-next/middleware/open-next.config.mjs - 7.51 KiB
18:43:30.397 - ../.cache/pnpm/dlx/7a167b0d3757277273520d190cb51afb1d08af3788311db20f179cca2ba72833/198e743287d-463/node_modules/.pnpm/unenv@2.0.0-rc.19/node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs - 7.25 KiB
18:43:26.460 Total Upload: 14310.89 KiB / gzip: 3064.17 KiB
18:43:30.343 Your Worker has access to the following bindings:
18:43:30.343 Binding Resource
18:43:30.344 env.ASSETS Assets
18:43:30.344
18:43:30.396 ✘ [ERROR] Your Worker failed validation because it exceeded size limits.
18:43:30.397
18:43:30.397
18:43:30.397 A request to the Cloudflare API (/accounts/fae9830f4778af657260ae8a9aa52308/workers/scripts/canvas-flow-studio/versions) failed.
18:43:30.397 - Your Worker exceeded the size limit of 3 MiB. Please upgrade to a paid plan to deploy Workers up to 10 MiB. https://dash.cloudflare.com/fae9830f4778af657260ae8a9aa52308/workers/plans [code: 10027]
18:43:30.397 To learn more about this error, visit: https://developers.cloudflare.com/workers/platform/limits/#worker-size
18:43:30.397 Here are the 5 largest dependencies included in your script:
18:43:30.397
18:43:30.397 - .open-next/server-functions/default/handler.mjs - 13350.17 KiB
18:43:30.397 - .open-next/middleware/handler.mjs - 780.69 KiB
18:43:30.397 - .open-next/.build/durable-objects/queue.js - 12.17 KiB
18:43:30.397 - .open-next/middleware/open-next.config.mjs - 7.51 KiB
18:43:30.397 - ../.cache/pnpm/dlx/7a167b0d3757277273520d190cb51afb1d08af3788311db20f179cca2ba72833/198e743287d-463/node_modules/.pnpm/unenv@2.0.0-rc.19/node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs - 7.25 KiB
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
Jakov
JakovOP3mo ago
Is it maybe related to me using some dependencies in convex/ (backend) while not using them in the src/ (frontend)?
Shados
Shados3mo ago
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.

Did you find this page helpful?