Error installing Local

Sometime yesterday, Local became unusably slow. I will regularly get 504 or 502 error and pages will take upwards of 25 seconds to load…if they load at all. I disabled Xdebug as stated in another post, but that didn’t seem to help. I also tried switching from nginx to Apache. VirtualBox has also been updated to the latest version. As well as restarting both Local and my computer.

My FPM log states:
[01-Mar-2017 01:08:46] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it

1 Like

I attempted to delete Local and reinstall everything, but am now receiving the following error when Local is attempting to run for the first time…

Mar 1, 2017, 4:35 PM PST - info: [main/index] Existing Pressmatic data does not exist.
Mar 1, 2017, 4:35 PM PST - info: [main/check-system] Check System: Docker Machine:  
{ stderr: 'Host does not exist: "local-by-flywheel"\n',
  stdout: '' }
Mar 1, 2017, 4:35 PM PST - info: [renderer/RendererAddonLoader] Renderer Loading Add-on: /Applications/Local by Flywheel.app/Contents/Resources/extraResources/addons/local-addon-demo-urls/lib/renderer.js
Mar 1, 2017, 4:35 PM PST - info: [renderer/RendererAddonLoader] Renderer Successfully Loaded Add-on: /Applications/Local by Flywheel.app/Contents/Resources/extraResources/addons/local-addon-demo-urls/lib/renderer.js
Mar 1, 2017, 4:35 PM PST - warn: [renderer/RendererAddonLoader] Renderer Add-on not enabled: local-addon-intellij-xdebug
Mar 1, 2017, 4:35 PM PST - info: [renderer/CheckEnvPage] Check system promise response: [ undefined, 'machine-does-not-exist' ] machine-does-not-exist
Mar 1, 2017, 4:35 PM PST - info: [main/autoUpdater] Update for darwin-x64-production-v1.4.2 is not available
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] Starting Docker Machine Creation...
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] IP IN USE:  192.168.75.1/24
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] IP IN USE:  192.168.80.1/24
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] IP IN USE:  192.168.85.1/24
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] IP IN USE:  192.168.90.1/24
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] IP IN USE:  192.168.50.1/24
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] IP IN USE:  192.168.55.1/24
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] IP IN USE:  192.168.60.1/24
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] IP IN USE:  192.168.65.1/24
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] IP IN USE:  192.168.70.1/24
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] Removing existing Docker Machine
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] null 'About to remove local-by-flywheel\nWARNING: This action will delete both local reference and remote instance.\n' 'Error removing host "local-by-flywheel": Host does not exist: "local-by-flywheel"\nCan\'t remove "local-by-flywheel"\n'
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] Creating Docker Machine... --virtualbox-boot2docker-url=file:///Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/boot2docker.iso
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] Creating machine with  
{ '0': 'create',
  '1': '--driver=virtualbox',
  '2': '--virtualbox-hostonly-cidr',
  '3': 'null',
  '4': '--virtualbox-boot2docker-url=file:///Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/boot2docker.iso',
  '5': 'local-by-flywheel' }
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] Running pre-create checks...
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] Creating machine...
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] (local-by-flywheel) Downloading /Users/danielmilner/.docker/machine/cache/boot2docker.iso from file:///Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/boot2docker.iso...
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] (local-by-flywheel) Creating VirtualBox VM...
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] (local-by-flywheel) Creating SSH key...
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] (local-by-flywheel) Starting the VM...
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] (local-by-flywheel) Check network to re-create if needed...
Mar 1, 2017, 4:36 PM PST - error: [main/docker-create-machine] Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: invalid CIDR address: null
Mar 1, 2017, 4:36 PM PST - info: [main/docker-create-machine] Unable to create Docker Machine.
Mar 1, 2017, 4:36 PM PST - info: [main/index] before-quit:
Mar 1, 2017, 4:36 PM PST - info: [main/index] All Local sites are stopped. Shutting down VM.

Hey Daniel,

It looks like you have a lot of VirtualBox network interfaces that aren’t being used

Go to VirtualBox.app » Preferences » Network » Host-only Networks and delete any that aren’t being used. After that you can relaunch Local and you should be set.

Also, regarding pm.max_children, you can bump that up in /conf/php/VERSION/etc/php-fpm.conf or in /conf/php/VERSION/etc/php-fpm.d/www.conf

Thank Clay, that resolved the installation issue, but now I am back to receiving the 504 Gateway Timeout issue almost immediately after starting up the site.

I increased pm.max_children from 5 to 50.

These are the last few lines from my FPM log:

[02-Mar-2017 20:30:34] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 49 total children

[02-Mar-2017 20:30:35] WARNING: [pool www] server reached pm.max_children setting (50), consider raising it
1 Like

This issue may be related to a background process library that I’m using in one of my plugins, since the site is running file without that plugin installed. I’ll need to look in to this.

1 Like