Local Community

Error backing up database when stopping site / mydumper Segmentation Fault

So I’m getting to alert() errors when I close my site on local

“MySQL was unavailable when Local tried to back up {site}'s satabase”
“Local ran into an issue while backing up {site}'s database to the site’s ‘app/sql’ directory”

any help?

I’ve attached snippetslocalFlywheel_app-sql_issueWithBackuplocalFlywheel_mysql_unavailableForBackup

That doesn’t look good!

Can you provide your Local logs? You can retrieve your Local log by following the steps outlined in this FAQ: How do I retrieve Local's log file?

– Ben

Looks like there are two errors when I close the site:

  • Jan 13, 2018, 10:33 PM CST - error: [main/backupDB] mydumper stderr Segmentation fault
  • Jan 13, 2018, 10:33 PM CST - error: [main/backupDB] mydumper stdout

local-by-flywheel.log (872.4 KB)

Yeah, that’s definitely not good.

What version of Local are you running?

Had these ‘backing up mysql issue’ errors from time to time as well, usually on sites that have somewhat larger databases.

Interestingly, these errors seem to tend to solve themselves on second or third try.

I’ve now upped the memory available to the Local image in VirtualBox to 2GB, so far I did not see the ‘backing up mysql issue’ again. If that’s purely coincidence or not, I can’t say, however.

Eric,

Sorry for the trouble!

Are you running AffiliateWP by chance?

Looks like I wrote too quickly, since I have a

mydumper stderr Segmentation fault

that won’t go away right now, after a forced restart of Local.
(No affiliateWP anywhere).

Update: restarting the Mac didn’t do the trick, either… but activating the site in local, and then doing something that touches the database (create/delete a post) seems to have worked.

I got the following message when shutting down a site in local:

“Uh-oh! Local ran into an issue while backing up Site’s database to the site’s “app/sql” directory. Please check the local-by-flywheel.log file for more details”.

Here is the bottom of the log file with the related output:

Feb 11, 2018, 4:43 PM PST - info: [main/waitForFile] /conf/php/7.1.4/etc/php-fpm.conf exists
Feb 11, 2018, 4:43 PM PST - info: [main/docker-router] getRouterContainers()
Feb 11, 2018, 4:43 PM PST - info: [main/docker-network-manager] maybeCreateNetwork
Feb 11, 2018, 4:43 PM PST - info: [main/docker-router] reconnectNetwork()
Feb 11, 2018, 4:43 PM PST - info: [main/docker-network-manager] doesNetworkExist
Feb 11, 2018, 4:43 PM PST - info: [main/docker-router] teardown()
Feb 11, 2018, 4:43 PM PST - info: [main/docker-router] Removing router container c604edc0c9bb2e2b33ad02b313bbbe42afc19aa864f41204e8290e870f337824
Feb 11, 2018, 4:43 PM PST - info: [main/docker-network-manager] Network exists.
Feb 11, 2018, 4:43 PM PST - info: [environment/custom] Starting php-fpm done
Feb 11, 2018, 4:43 PM PST - info: [main/docker-network-manager] Connected cf6fddd4f5d9eb3ba9f77c2d6f082a3fec9bd7160e281f2ba82922725fc2d14b.
Feb 11, 2018, 4:43 PM PST - info: [main/docker-network-manager] Connected b67ae8f471f2a82c80519bcc29b62252b4d6dc0d6be69f5dca0f6a7f8488d22a.
Feb 11, 2018, 4:43 PM PST - info: [main/docker-network-manager] Connected 01a81516092764747b585eae526ab41c03e76c0b8dfe742cda625e2cb6e2d53b.
Feb 11, 2018, 4:43 PM PST - info: [main/docker-network-manager] Connected b43096715f6d5d583dae5505730b426adfd2fe76a3230b7960a250c606943b5d.
Feb 11, 2018, 4:43 PM PST - info: [main/docker-router] updateProxyManager()
Feb 11, 2018, 4:43 PM PST - info: [main/docker-router] runContainer()
Feb 11, 2018, 4:43 PM PST - info: [main/docker-network-manager] Connected 5eeffdcfcd65e62de3ce560020a37e3a308321d173f4ca7241435b6415707f6b.
Feb 11, 2018, 4:43 PM PST - info: [main/waitForMySQL] Querying MySQL
Feb 11, 2018, 4:43 PM PST - info: [main/waitForMySQL] Querying MySQL
Feb 11, 2018, 4:43 PM PST - info: [main/stopSite] Stopping site: running mydumper
Feb 11, 2018, 4:43 PM PST - info: [main/backupDB] Running mydumper on rJtbpwOZf
Feb 11, 2018, 4:43 PM PST - error: [main/backupDB] mydumper stderr Segmentation fault
Feb 11, 2018, 4:43 PM PST - info: [main/stopSite] Stopping site: stopping container 5eeffdcfcd65e62de3ce560020a37e3a308321d173f4ca7241435b6415707f6b
Feb 11, 2018, 4:43 PM PST - error: [main/backupDB] mydumper stdout

First time I’ve seen it so thought I’d report the issue.

Hi @Alberto,

Thanks for the report!

What version of Local are you running?

Also, can you provide a list of the plugins you are running?

Hi @clay, I’m running Local 2.2.3. Here are the plugins running:

+-------------------------------------+--------+--------+-------------+
| name                                | status | update | version     |
+-------------------------------------+--------+--------+-------------+
| advanced-iframe                     | active | none   | 7.5.1.1     |
| amember4                            | active | none   | 1.1         |
| amp                                 | active | none   | 0.6.1       |
| content-aware-sidebars              | active | none   | 3.7.4       |
| convertplug                         | active | none   | 3.2.0       |
| custom-post-type-page-template      | active | none   | 1.0.1       |
| disqus-comment-system               | active | none   | 3.0.12      |
| stops-core-theme-and-plugin-updates | active | none   | 7.0.0       |
| envato-market                       | active | none   | 1.0.0-RC2   |
| ewww-image-optimizer                | active | none   | 4.0.6       |
| fooboxV2                            | active | none   | 2.3.2.39    |
| footable                            | active | none   | 0.3.1       |
| intuitive-custom-post-order         | active | none   | 3.1.1       |
| sfwd-lms                            | active | none   | 2.5.4       |
| learndash-propanel                  | active | none   | 2.1.2       |
| ld-visual-customizer                | active | none   | 1.6.1       |
| menu-by-user-role                   | active | none   | 1.0.4.55001 |
| search-exclude                      | active | none   | 1.2.2       |
| trades-core-plugin                  | active | none   | 1.4         |
| trades-shortcodes-plugin            | active | none   | 1.2         |
| trades-widgets-plugin               | active | none   | 1.4         |
| uncanny-learndash-toolkit           | active | none   | 2.3         |
| user-role-editor                    | active | none   | 4.40        |
| real-media-library                  | active | none   | 3.2.1       |
| wp-staging                          | active | none   | 2.1.8       |
| wordpress-seo                       | active | none   | 6.2         |
+-------------------------------------+--------+--------+-------------+

I am having the same error while shutting down a site.
Any clue how to fix this?

Maybe it’s just a coincidence, but when I very occasionally got this error, it always went away after rebooting my Mac.

Why that is, I have no idea.

I’m also getting this error, just on one of my sites (I have about 25 in Local, though I’ve only tested about 5 for this issue).

Running 2.2.4.

So sorry I just made a post about this same thing! Was this ever fixed?

This error comes and goes. I thought I fixed it by changing toe permissions to the SQL folder of the local website to 755 as per a previous post. But on newer versions of Local, it has returned - for some websites and not for others. So I don’t know why mySQL becomes disconnected from your website as you stop the website.

Hey all,

We’re looking into removing the myloader/mydumper dependency in Local due to this issue. I’ll keep you all updated!

I’ve been getting this error also. (Local by Flywheel 2.2.4, macOS 10.13.4)

It’s not every site. I’ve cloned the problem sites and in most, but not all cases, the cloned sites can be stopped without throwing the segmentation fault error.

If anyone is still running into this issue, please do the following to help us gather more information:

  1. Start the site if it’s not running
  2. Right-click on the site in Local’s sidebar
  3. Go to Open Site SSH
  4. Run the following command
mysql -u root -proot -e "SHOW FULL TABLES IN local WHERE TABLE_TYPE LIKE 'VIEW';"
  1. Copy and paste the results (if there are any) in your reply here.

This command will show the MySQL views (if any) that are in your Local site’s database.

This can’t be what you wanted:
Warning: Using a password on the command line interface can be insecure.

I broke up the command going in with “mysql -u root” then got

mysql> SHOW FULL TABLES IN local WHERE TABLE_TYPE LIKE ‘VIEW’;
Empty set (0.00 sec)

1 Like