I could try that but I used to have the site as a Custom environment, back when I first posted the issue. Since then, I switched to preferred so I could use Connect to Flywheel. I’d rather not switch if I don’t need to. I’ve got one more update to push to the live site and then I plan to use WP Stagecoach so I can merge live store data with updates from the dev/staging site.
Right now the culprit looks like inotifywait. We use it in the Preferred environment for automatically flushing the Varnish cache when anything in the themes or plugins folder changes.
For what it’s worth, I’m experiencing the same issue (CPU spike). Here’s how to replicate the issue:
I have multiple plugins under active development in my plugins directory. All are Git repos. One of the plugins uses NPM, and so there are a lot of node_modules in this specific plugin folder. None of these plugins are activated. The VBoxHeadless process hovers right around 100% constantly.
If I remove all the plugins, CPU usage goes back to around 4.9% (normal).
If I add all plugins back, except the one using NPM, CPU usage is normal (4.9%).
I restarted the site without the plugin with NPM in Local, and CPU usage is normal (4.9%).
So, the issue must be related to NPM or indexing lots of files/folders (node modules).
You can replicate by cloning this repo into your plugins folder, switching to the vue.js branch, then run NPM install:
I’m also looking for a solution, as I use local for local plugin development.
Please do let me know if you find a solution.
Thanks,
Thad
I was experiencing this issue as well with git and node modules inside a theme but I found a solution, well what seems to be one anyway.
I increased the virtual machines CPUs to two and changed reduced the execution cap to 75%. Im assuming this allows the VM to complete whatever it is trying to do in a timely fashion and not get caught up in requests.
As a note, the CPU load hasn’t occurred for me with a clean install, not that I can recall anyway.