All Sites 502 Request Error and MySQL Unavailable

I am having quite a few issues with all of my Local by Flywheel sites.

  1. When I start an existing site, I get a 502 Request Error. The error in Local’s Routers Log says this:

     2019/04/02 19:34:20 [error] 6#6: *9 upstream prematurely closed connection while reading response header from upstream, client: 192.168.75.1, server: sandbox.local, request: "GET /local-adminer-S1TPAMd9b.php?username&db=local HTTP/1.1", upstream: "http://192.168.75.100:4040/local-adminer-S1TPAMd9b.php?username&db=local", host: "sandbox.local"
    

    2019/04/02 19:34:22 [error] 6#6: *9 upstream prematurely closed connection while reading response header from upstream, client: 192.168.75.1, server: sandbox.local, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://192.168.75.100:4040/favicon.ico”, host: “sandbox.local”, referrer: “http://sandbox.local/local-adminer-S1TPAMd9b.php?username&db=local

The site has the following config:
nginx
PHP version 5.6.20
MySQL version 5.5
WordPress version 4.8.8
Local Environment: Preferred 1.0.0 (Update Available)

  1. When I try to stop this site, I get an alert saying “Uh-oh! MySQL was unavailable when Local tried to back up Sandbox’s database. Please check the local-by-flywheel.log file for more details.”

local-by-flywheel.log says:

Apr 2, 2019, 3:41 PM EDT - info: [main/stopSite] Stopping site: running mydumper
Apr 2, 2019, 3:41 PM EDT - warn: [main/waitForMySQL] waitForMySQL Response: 
{ stdout: '', stderr: '' }
Apr 2, 2019, 3:41 PM EDT - info: [main/stopSite] Stopping site: stopping container a6da3d5f27885054f500d7bbb3418f370e133d1cc2e3413a3bde850867f4076d
Apr 2, 2019, 3:41 PM EDT - error: [main/exportDB]  
{ message: '',
  stack:
   'Error\n    at /Applications/Local by Flywheel.app/Contents/Resources/app.asar/main/actions-sites/wait-for-mysql.js:1:2853\n    at Generator.next (<anonymous>)\n    at _0x5bab70 (/Applications/Local by Flywheel.app/Contents/Resources/app.asar/main/actions-sites/wait-for-mysql.js:1:1645)\n    at /Applications/Local by Flywheel.app/Contents/Resources/app.asar/main/actions-sites/wait-for-mysql.js:1:1904\n    at process._tickCallback (internal/process/next_tick.js:68:7)' }
Apr 2, 2019, 3:42 PM EDT - warn: [main/waitForMySQL] waitForMySQL Response: 
{ stdout: 'cannot exec in a stopped state: unknown',
  stderr: '' }
Apr 2, 2019, 3:42 PM EDT - warn: [main/SiteModel] wpInstalled not returning "installed" 
{ message: '',
  stack:
   'Error\n    at /Applications/Local by Flywheel.app/Contents/Resources/app.asar/main/actions-sites/wait-for-mysql.js:1:2853\n    at Generator.next (<anonymous>)\n    at _0x5bab70 (/Applications/Local by Flywheel.app/Contents/Resources/app.asar/main/actions-sites/wait-for-mysql.js:1:1645)\n    at /Applications/Local by Flywheel.app/Contents/Resources/app.asar/main/actions-sites/wait-for-mysql.js:1:1904\n    at process._tickCallback (internal/process/next_tick.js:68:7)' }
  1. Creating a new site resulted in an error that WordPress could not be installed.

I’ve done the following:

  • Manually updated Local by Flywheel from 3.0.2 to 3.0.4.
  • Restart Local Machine
  • Restart computer (MacOS Mojave)
  • Tested this on test and sandbox sites in case the database gets wiped. I have not started or stopped any of my real sites, except for one site on which I first noticed this happening. On that site, I forget what happened, but Local made me clone the install to another install. Maybe I clicked update environment. Then I started noticing these issues and the cloned site will not start either.

I’m not finding anything in my searches to get me closer to fixing this. Any clues or fixes?

Hi @lepittenger,

So sorry for the trouble! I appreciate all of the details :slight_smile:

Can you please provide the entire Local log along with the logs folder for any one of the sites that failing to start up? You can zip up the site’s logs folder and attach it here.

Also, feel free to e-mail the logs (clay@getflywheel.com) if you do not want to post them publicly.

Thanks, Clay. I’ve just emailed them to you.

Hey @clay, did you receive my log files? Hoping to get this resolved so I can get into my local sites