-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
High CPU Usage with Nuxt Dev Server in Docker #27617
Comments
When I set
|
Configuring You could try experimenting with export default defineNuxtConfig({
experimental: {
watcher: 'chokidar' // or 'chokidar-granular' or 'parcel'
},
}) |
@tmorgan497 I tried your reproduction (with Docker) and HMR is working fine for me. Also, I am not seeing high CPU usage. But I am on Also, I noticed that there is a directory called |
I added the following to my nuxt.config.ts with no luck. Still high CPU usage.
I also ran the container on a NixOS system and I'm not getting the same high CPU usage. So maybe it's a Windows thing 🤷. Even with |
Environment
Reproduction
https://github.com/tmorgan497/minimal-nuxt-docker
Steps to reproduce:
Describe the bug
This minimally viable app contains nuxt 3 and a few modules:
When running this app in docker, the CPU usage is very high for what it should be (anywhere between 65% and 150%).
I may have narrowed it down to chokidar. When i comment out the environment variable
CHOKIDAR_USEPOLLING=true
, the CPU usage goes down to a normal level (under 1%). IIRC, chokidar is used for HMR, so I usually leave it active during development so I don't have to restart the container everytime I make a change. I added a watcher ignore param to my nuxt.config.ts, but it doesn't seem to do anything to help reduce the CPU usage.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: