'Laravel Homestead issue after importing database
I'm running into a very strange intermittent issue with Laravel Homestead. I have a large handful of local Craft CMS sites set up in Homestead. When I import a fresh copy of the database for one of my sites, and then try to access the site in the browser, Homestead starts eating up my CPU to the point where my laptop fan is spinning and I can see in activity monitor that VBoxHeadless is running wild (oftentimes it goes as high as 200% CPU usage). The request will eventually time out, but VBoxHeadless doesn't slow down until I run vagrant halt or vagrant reload.
This does not always happen. It seems that if I run vagrant reload, then import the database, then run vagrant reload again before accessing the site that this prevents the issue from occurring.
Other notes:
This was not happening in my local environment until I recently updated all of my software to the following versions:
VirtualBox v6.1.32
Vagrant v2.2.19
Homestead v13.0.1
When I run into this issue and then run vagrant reload, this does not fix the issue. I have to run vagrant reload, re-import the database, then run vagrant reload again before accessing the site to fix the issue.
This issue is also not specific to a single site, I have seen it on multiple local sites. It is also not specific to the method that I use to import the database.
Would really appreciate any help figuring out what could be causing this!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
