Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payload using 100% CPU usage in idle #11276

Open
marwinhormiz opened this issue Feb 19, 2025 · 1 comment · May be fixed by #11315
Open

Payload using 100% CPU usage in idle #11276

marwinhormiz opened this issue Feb 19, 2025 · 1 comment · May be fixed by #11315

Comments

@marwinhormiz
Copy link
Contributor

marwinhormiz commented Feb 19, 2025

Describe the Bug

There is currently an issue with running the dev server and production server on the Remix example provided in this repo (on fresh installs). When starting either of the builds, node is using more than 100% of the CPU when in idle.

Here is an image of a pod utilizing 110% of the CPU using up half of my 2vCPU Kubernetes node.
Image

Image

This is only an issue with this example. When using a fresh install of Remix by itself the CPU utilization is normal and nothing unusual.

If you remove the getPayload call in the loader and action, the CPU usage goes back down to normal but the second getPayload is used, the CPU is up at 100%.

Using strace on the PID of the node process that is causing 100% CPU usage shows this message being spammed:
"[pid 122148] access("/payload.config.ts", F_OK^C) = -1 ENOENT (No such file or directory)"

Image

EDIT:

A quick solution to this is to add PAYLOAD_CONFIG_PATH environment variable in the dev script pointing to the payload.config.ts and Payload wills stop spamming the file opening and the CPU usage goes back down to normal. I still think there is a bigger problem here that needs to be looked into than using this quick fix.

Image

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/tree/main/examples/remix

Reproduction Steps

Fresh install on the Remix example, start the development server and use 'top' to see the CPU usage of node.

Which area(s) are affected? (Select all that apply)

plugin: other

Environment Info

payload: 3.21.0
pnpm: 9.14.4
node: 22.11.0
@marwinhormiz marwinhormiz added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction labels Feb 19, 2025
@marwinhormiz marwinhormiz changed the title Remix example on 100% CPU usage in idle Payload using 100% CPU usage in idle Feb 20, 2025
@r1tsuu r1tsuu self-assigned this Feb 21, 2025
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Feb 21, 2025
@david-unisco
Copy link

Any help people? I am experiencing this as well with my deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants