Bug Summary
Starting a large multisite (100+ sub-sites) fails with “Uh-oh! Unable to start site.” because mysqladmin ping can’t connect to the socket. mysqld does start, but it isn’t ready before Local stops pinging, so the site never starts.
This is the same behavior I reported earlier ( https://community.localwp.com/t/uh-oh-unable-to-provision-site-on-large-multisite-setup/46050 ), which has resurfaced in Local 10.2.x with the bundled MySQL 8.0.35+4. A fix was provided which worked for a long time, but now it resurfaced, and I think it happended with v10.2.
Steps to reproduce
- Open a multisite with 100+ sub-sites.
- Start (or stop and start) the site.
- Local shows “Unable to start site.”
Environment Info
- macOS: [version]
- Local: [10.2.x + build]
- Web server / PHP: [e.g. Nginx, PHP 8.x]
- MySQL: 8.0.35+4
- Site: multisite, 100+ sub-sites [approx. DB size]
Supporting info
Error shown:
Error: Command failed: %%userDataPath%%/lightning-services/mysql-8.0.35+4/bin/darwin/bin/mysqladmin ping
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Can’t connect to local MySQL server through socket ‘%%site.runData%%/mysql/mysqld.sock’ (2)’
Check that mysqld is running and that the socket exists!
- Other single sites and multisites start fine; only the very large multisites are affected.
- [Log line “Database did NOT respond to ping after 15 tries”, if present. Also whether mysqld shows in Activity Monitor afterwards.]
- Screenshot and Local logs (Support > Download Local Logs) attached.