Bug Summary
When trying to start LocalWP multisite sites with many sub-sites (approx more than 100), the connection to the db frequently fails (s. screenshot). The db actually starts, but it seems to me that it just takes too long for LocalWP, which times out and doesn’t start the site. Sometimes I have to retry 10 - 50 times before the site eventually starts.
Steps to reproduce
- Create a multisite setup with more than 100 sub-sites (not sure about the actual treshold).
- (Stop and) start the site.
Environment Info
Describe your environment.
- MacOs: 14.6.1 (23G93)
- What versions of site software is used: Nginx, PHP: 8.2, MySQL; 8.0.16
- What version of Local is installed: Version 9.1.1+6738
Supporting info
{“level”:“error”,“message”:“Database did NOT respond to ping after 15 tries.”,“service”:{},“serviceBinVersion”:{},“stack”:“Error: Command failed: %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqladmin ping\n\u0007mysqladmin: connect to server at ‘localhost’ failed\nerror: ‘Can’t connect to local MySQL server through socket ‘%%site.runData%%/mysql/mysqld.sock’ (2)’\nCheck that mysqld is running and that the socket: ‘%%site.runData%%/mysql/mysqld.sock’ exists!\n\n at ChildProcess.exithandler (node:child_process:422:12)\n at ChildProcess.emit (node:events:517:28)\n at ChildProcess.emit (node:domain:489:12)\n at maybeClose (node:internal/child_process:1098:16)\n at ChildProcess._handle.onexit (node:internal/child_process:303:5)”,“thread”:“main”,“timestamp”:“2024-12-18T08:08:03.604Z”}
{“class”:“SiteProcessManagerService”,“level”:“error”,“message”:“Unable to start site.”,“stack”:“Error: Command failed: %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqladmin ping\n\u0007mysqladmin: connect to server at ‘localhost’ failed\nerror: ‘Can’t connect to local MySQL server through socket ‘%%site.runData%%/mysql/mysqld.sock’ (2)’\nCheck that mysqld is running and that the socket: ‘%%site.runData%%/mysql/mysqld.sock’ exists!\n\n at ChildProcess.exithandler (node:child_process:422:12)\n at ChildProcess.emit (node:events:517:28)\n at ChildProcess.emit (node:domain:489:12)\n at maybeClose (node:internal/child_process:1098:16)\n at ChildProcess._handle.onexit (node:internal/child_process:303:5)”,“thread”:“main”,“timestamp”:“2024-12-18T08:08:03.605Z”}
{“class”:“Process”,“level”:“warn”,“message”:“2024-12-18T08:07:55.663210Z 0 [System] [MY-010116] [Server] %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqld (mysqld 8.0.16) starting as process 1363”,“process”:“mysql”,“thread”:“main”,“timestamp”:“2024-12-18T08:08:34.960Z”}
{“class”:“Process”,“level”:“warn”,“message”:“2024-12-18T08:07:55.666485Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.”,“process”:“mysql”,“thread”:“main”,“timestamp”:“2024-12-18T08:08:34.960Z”}
{“class”:“Process”,“level”:“warn”,“message”:“2024-12-18T08:07:55.667078Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for %%site.runData%%/mysql/data/ is case insensitive”,“process”:“mysql”,“thread”:“main”,“timestamp”:“2024-12-18T08:08:34.960Z”}
{“class”:“Process”,“level”:“warn”,“message”:“2024-12-18T08:08:05.222866Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.”,“process”:“mysql”,“thread”:“main”,“timestamp”:“2024-12-18T08:08:34.961Z”}
{“class”:“Process”,“level”:“warn”,“message”:“2024-12-18T08:08:05.248840Z 0 [System] [MY-010931] [Server] %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqld: ready for connections. Version: ‘8.0.16’ socket: ‘%%site.runData%%/mysql/mysqld.sock’ port: 10189 MySQL Community Server - GPL.”,“process”:“mysql”,“thread”:“main”,“timestamp”:“2024-12-18T08:08:34.961Z”}