You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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)"
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.
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.

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)"
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.
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
The text was updated successfully, but these errors were encountered: