cloudflare / next-on-pages

CLI to build and develop Next.js apps for Cloudflare Pages
https://www.npmjs.com/package/@cloudflare/next-on-pages
MIT License
1.24k stars 119 forks source link

[🐛 Bug]: Worker exceeded CPU limit. #700

Open anonymouscatcher opened 6 months ago

anonymouscatcher commented 6 months ago

next-on-pages environment related information

I'll share the website URL + project name in private with you.

Description

We are still in the process of migrating our application from AWS to Cloudflare. After encountering numerous issues and going back and forth, we finally managed to see our website live on Cloudflare. However, something strange is happening for which we cannot determine the reason. I attempted to review the logs using npx wrangler pages deployment tail, and it appears that we are encountering a "Worker exceeded CPU limit" error. After refreshing the page a few times or navigating to different parts of the website, it goes down. It seems this happens in all workers and all pages.

Thank you :)

Reproduction

No response

Pages Deployment Method

Pages CI (GitHub/GitLab integration)

Pages Deployment ID

No response

Additional Information

We made a proxy api to handle all client requests, in RSC we send request directly to our backend but on client all request are being handle with the proxy I mentioned. I don't think that causing the issue because worker limit also occurs on RSCs.

Would you like to help?

ItsWendell commented 1 month ago

We also see occasional spikes in CPU that are hard to debug on rendering of specific pages, we don't want to set a CPU limit, since we can't monitor properly when these happen because pages don't support tail workers yet.

image