Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Cannot clone WordPress app, get error: "Addons Error: Error restoring mysql: read ECONNRESET"

Cannot clone WordPress app, get error: "Addons Error: Error restoring mysql: read ECONNRESET"

Scheduled Pinned Locked Moved Solved Support
wordpressmysqlclone
12 Posts 2 Posters 1.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • girishG girish

    @d19dotca This is most likely because mysql is running out of memory. Can you maybe try to give it more memory in Services -> mysql ?

    d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    wrote on last edited by d19dotca
    #3

    @girish Sure, I can try.

    Quick question though if that's the root cause... why does this only impact this one app? I can successfully clone from other WordPress instances without problem, it's only this one. And it's database I suspect isn't that much larger than any others, especially it's "sister site" which is basically a replica of it.

    I'll try though now and see what the outcome is.

    Update: MySQL seems to be okay for the most part, should have plenty left:
    99a4f329-5da4-4da1-8723-fb8105b5ffce-image.png

    --
    Dustin Dauncey
    www.d19.ca

    1 Reply Last reply
    0
    • girishG girish

      @d19dotca This is most likely because mysql is running out of memory. Can you maybe try to give it more memory in Services -> mysql ?

      d19dotcaD Offline
      d19dotcaD Offline
      d19dotca
      wrote on last edited by
      #4

      @girish Okay I increased memory from 4 GB to 5.75 GB, and still the same behaviour. I don't think it's a memory issue at this point, MySQL has plenty of it.

      fc812426-55dc-4eb0-840c-96c366811242-image.png

      --
      Dustin Dauncey
      www.d19.ca

      girishG 1 Reply Last reply
      0
      • d19dotcaD d19dotca

        @girish Okay I increased memory from 4 GB to 5.75 GB, and still the same behaviour. I don't think it's a memory issue at this point, MySQL has plenty of it.

        fc812426-55dc-4eb0-840c-96c366811242-image.png

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #5

        @d19dotca Do you see a crash in the mysql service logs?

        d19dotcaD 1 Reply Last reply
        0
        • girishG girish

          @d19dotca Do you see a crash in the mysql service logs?

          d19dotcaD Offline
          d19dotcaD Offline
          d19dotca
          wrote on last edited by
          #6

          @girish Interestingly enough I don't see a crash but I see duplicate keys apparently (and this is from a custom plugin from a payment provider my client was wanting to integrate with "Motion Pay").

          Here is what I see in the logs:

          Nov 10 16:59:22 Stderr from db import: ERROR 1022 (23000) at line 1283: Can't write; duplicate key in table 'wp_wc_motionpay_loginfo'
          Nov 10 16:59:22
          Nov 10 16:59:22 events.js:287
          Nov 10 16:59:22 throw er; // Unhandled 'error' event
          Nov 10 16:59:22 ^
          Nov 10 16:59:22
          Nov 10 16:59:22 Error: write EPIPE
          Nov 10 16:59:22 at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16)
          Nov 10 16:59:22 Emitted 'error' event on Socket instance at:
          Nov 10 16:59:22 at errorOrDestroy (internal/streams/destroy.js:108:12)
          Nov 10 16:59:22 at Socket.onerror (_stream_readable.js:729:7)
          Nov 10 16:59:22 at Socket.emit (events.js:310:20)
          Nov 10 16:59:22 at errorOrDestroy (internal/streams/destroy.js:108:12)
          Nov 10 16:59:22 at onwriteError (_stream_writable.js:463:5)
          Nov 10 16:59:22 at onwrite (_stream_writable.js:484:5)
          Nov 10 16:59:22 at internal/streams/destroy.js:50:7
          Nov 10 16:59:22 at Socket._destroy (net.js:677:5)
          Nov 10 16:59:22 at Socket.destroy (internal/streams/destroy.js:38:8)
          Nov 10 16:59:22 at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:93:12) {
          Nov 10 16:59:22 errno: 'EPIPE',
          Nov 10 16:59:22 code: 'EPIPE',
          Nov 10 16:59:22 syscall: 'write'
          Nov 10 16:59:22 }
          Nov 10 16:59:22 2020-11-11 00:59:22,041 INFO exited: mysql-service (exit status 1; not expected)
          Nov 10 16:59:22 2020-11-11 00:59:22,042 INFO reaped unknown pid 1488
          Nov 10 16:59:23 2020-11-11 00:59:23,045 INFO spawned: 'mysql-service' with pid 1489
          Nov 10 16:59:23 Mysql service endpoint listening on https://:::3000
          Nov 10 16:59:24 2020-11-11 00:59:24,360 INFO success: mysql-service entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
          Nov 10 17:05:53 [DELETE] /databases/07a886774d4f5d09
          Nov 10 17:26:58 [GET] /healthcheck
          Nov 10 17:27:46 [GET] /healthcheck
          Nov 10 17:28:01 [DELETE] /databases/a262c28a1b3d64fe
          Nov 10 17:28:02 [POST] /databases
          Nov 10 17:28:18 [POST] /databases/a262c28a1b3d64fe/clear
          Nov 10 17:28:18 clear: database a262c28a1b3d64fe
          Nov 10 17:28:35 [POST] /databases/a262c28a1b3d64fe/restore
          Nov 10 17:28:35 restore: database a262c28a1b3d64fe
          Nov 10 17:28:38 Stderr from db import: ERROR
          Nov 10 17:28:38 Stderr from db import: 1022 (23000)
          Nov 10 17:28:38 Stderr from db import: at line 1283
          Nov 10 17:28:38 Stderr from db import: : Can't write; duplicate key in table 'wp_wc_motionpay_loginfo'
          Nov 10 17:28:38
          Nov 10 17:28:38 events.js:287
          Nov 10 17:28:38 throw er; // Unhandled 'error' event
          Nov 10 17:28:38 ^
          Nov 10 17:28:38
          Nov 10 17:28:38 Error: write EPIPE
          Nov 10 17:28:38 at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16)
          Nov 10 17:28:38 Emitted 'error' event on Socket instance at:
          Nov 10 17:28:38 at errorOrDestroy (internal/streams/destroy.js:108:12)
          Nov 10 17:28:38 at Socket.onerror (_stream_readable.js:729:7)
          Nov 10 17:28:38 at Socket.emit (events.js:310:20)
          Nov 10 17:28:38 at errorOrDestroy (internal/streams/destroy.js:108:12)
          Nov 10 17:28:38 at onwriteError (_stream_writable.js:463:5)
          Nov 10 17:28:38 at onwrite (_stream_writable.js:484:5)
          Nov 10 17:28:38 at internal/streams/destroy.js:50:7
          Nov 10 17:28:38 at Socket._destroy (net.js:677:5)
          Nov 10 17:28:38 at Socket.destroy (internal/streams/destroy.js:38:8)
          Nov 10 17:28:38 at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:93:12) {
          Nov 10 17:28:38 errno: 'EPIPE',
          Nov 10 17:28:38 code: 'EPIPE',
          Nov 10 17:28:38 syscall: 'write'
          Nov 10 17:28:38 }
          Nov 10 17:28:38 2020-11-11 01:28:38,912 INFO exited: mysql-service (exit status 1; not expected)
          Nov 10 17:28:38 2020-11-11 01:28:38,916 INFO reaped unknown pid 1502
          Nov 10 17:28:39 2020-11-11 01:28:39,922 INFO spawned: 'mysql-service' with pid 1503
          Nov 10 17:28:40 Mysql service endpoint listening on https://:::3000
          Nov 10 17:28:41 2020-11-11 01:28:41,232 INFO success: mysql-service entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
          Nov 10 17:28:55 [GET] /healthcheck
          

          Seems strange to me though that this would be caused by any kind of duplicate key in the table, if it's not a duplicate key setting it off in the live instance then why would it appear in the clone? Strange.

          --
          Dustin Dauncey
          www.d19.ca

          girishG 1 Reply Last reply
          0
          • d19dotcaD d19dotca

            @girish Interestingly enough I don't see a crash but I see duplicate keys apparently (and this is from a custom plugin from a payment provider my client was wanting to integrate with "Motion Pay").

            Here is what I see in the logs:

            Nov 10 16:59:22 Stderr from db import: ERROR 1022 (23000) at line 1283: Can't write; duplicate key in table 'wp_wc_motionpay_loginfo'
            Nov 10 16:59:22
            Nov 10 16:59:22 events.js:287
            Nov 10 16:59:22 throw er; // Unhandled 'error' event
            Nov 10 16:59:22 ^
            Nov 10 16:59:22
            Nov 10 16:59:22 Error: write EPIPE
            Nov 10 16:59:22 at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16)
            Nov 10 16:59:22 Emitted 'error' event on Socket instance at:
            Nov 10 16:59:22 at errorOrDestroy (internal/streams/destroy.js:108:12)
            Nov 10 16:59:22 at Socket.onerror (_stream_readable.js:729:7)
            Nov 10 16:59:22 at Socket.emit (events.js:310:20)
            Nov 10 16:59:22 at errorOrDestroy (internal/streams/destroy.js:108:12)
            Nov 10 16:59:22 at onwriteError (_stream_writable.js:463:5)
            Nov 10 16:59:22 at onwrite (_stream_writable.js:484:5)
            Nov 10 16:59:22 at internal/streams/destroy.js:50:7
            Nov 10 16:59:22 at Socket._destroy (net.js:677:5)
            Nov 10 16:59:22 at Socket.destroy (internal/streams/destroy.js:38:8)
            Nov 10 16:59:22 at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:93:12) {
            Nov 10 16:59:22 errno: 'EPIPE',
            Nov 10 16:59:22 code: 'EPIPE',
            Nov 10 16:59:22 syscall: 'write'
            Nov 10 16:59:22 }
            Nov 10 16:59:22 2020-11-11 00:59:22,041 INFO exited: mysql-service (exit status 1; not expected)
            Nov 10 16:59:22 2020-11-11 00:59:22,042 INFO reaped unknown pid 1488
            Nov 10 16:59:23 2020-11-11 00:59:23,045 INFO spawned: 'mysql-service' with pid 1489
            Nov 10 16:59:23 Mysql service endpoint listening on https://:::3000
            Nov 10 16:59:24 2020-11-11 00:59:24,360 INFO success: mysql-service entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
            Nov 10 17:05:53 [DELETE] /databases/07a886774d4f5d09
            Nov 10 17:26:58 [GET] /healthcheck
            Nov 10 17:27:46 [GET] /healthcheck
            Nov 10 17:28:01 [DELETE] /databases/a262c28a1b3d64fe
            Nov 10 17:28:02 [POST] /databases
            Nov 10 17:28:18 [POST] /databases/a262c28a1b3d64fe/clear
            Nov 10 17:28:18 clear: database a262c28a1b3d64fe
            Nov 10 17:28:35 [POST] /databases/a262c28a1b3d64fe/restore
            Nov 10 17:28:35 restore: database a262c28a1b3d64fe
            Nov 10 17:28:38 Stderr from db import: ERROR
            Nov 10 17:28:38 Stderr from db import: 1022 (23000)
            Nov 10 17:28:38 Stderr from db import: at line 1283
            Nov 10 17:28:38 Stderr from db import: : Can't write; duplicate key in table 'wp_wc_motionpay_loginfo'
            Nov 10 17:28:38
            Nov 10 17:28:38 events.js:287
            Nov 10 17:28:38 throw er; // Unhandled 'error' event
            Nov 10 17:28:38 ^
            Nov 10 17:28:38
            Nov 10 17:28:38 Error: write EPIPE
            Nov 10 17:28:38 at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16)
            Nov 10 17:28:38 Emitted 'error' event on Socket instance at:
            Nov 10 17:28:38 at errorOrDestroy (internal/streams/destroy.js:108:12)
            Nov 10 17:28:38 at Socket.onerror (_stream_readable.js:729:7)
            Nov 10 17:28:38 at Socket.emit (events.js:310:20)
            Nov 10 17:28:38 at errorOrDestroy (internal/streams/destroy.js:108:12)
            Nov 10 17:28:38 at onwriteError (_stream_writable.js:463:5)
            Nov 10 17:28:38 at onwrite (_stream_writable.js:484:5)
            Nov 10 17:28:38 at internal/streams/destroy.js:50:7
            Nov 10 17:28:38 at Socket._destroy (net.js:677:5)
            Nov 10 17:28:38 at Socket.destroy (internal/streams/destroy.js:38:8)
            Nov 10 17:28:38 at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:93:12) {
            Nov 10 17:28:38 errno: 'EPIPE',
            Nov 10 17:28:38 code: 'EPIPE',
            Nov 10 17:28:38 syscall: 'write'
            Nov 10 17:28:38 }
            Nov 10 17:28:38 2020-11-11 01:28:38,912 INFO exited: mysql-service (exit status 1; not expected)
            Nov 10 17:28:38 2020-11-11 01:28:38,916 INFO reaped unknown pid 1502
            Nov 10 17:28:39 2020-11-11 01:28:39,922 INFO spawned: 'mysql-service' with pid 1503
            Nov 10 17:28:40 Mysql service endpoint listening on https://:::3000
            Nov 10 17:28:41 2020-11-11 01:28:41,232 INFO success: mysql-service entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
            Nov 10 17:28:55 [GET] /healthcheck
            

            Seems strange to me though that this would be caused by any kind of duplicate key in the table, if it's not a duplicate key setting it off in the live instance then why would it appear in the clone? Strange.

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #7

            @d19dotca That's indeed strange. Does this happen even if you create a new backup and try to clone from that? I cannot think of a case where a table has duplicate keys in the current database but fails only on re-import! Very intriguing.

            d19dotcaD 1 Reply Last reply
            0
            • girishG girish

              @d19dotca That's indeed strange. Does this happen even if you create a new backup and try to clone from that? I cannot think of a case where a table has duplicate keys in the current database but fails only on re-import! Very intriguing.

              d19dotcaD Offline
              d19dotcaD Offline
              d19dotca
              wrote on last edited by
              #8

              @girish Just tried, same issue if I take a fresh backup and clone from that new backup. It's so weird.

              --
              Dustin Dauncey
              www.d19.ca

              girishG 1 Reply Last reply
              0
              • d19dotcaD d19dotca

                @girish Just tried, same issue if I take a fresh backup and clone from that new backup. It's so weird.

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #9

                @d19dotca There will be a mysqldump file in the backup. Can you check if it has duplicate keys for the table wp_wc_motionpay_loginfo ?

                d19dotcaD 1 Reply Last reply
                0
                • girishG girish

                  @d19dotca There will be a mysqldump file in the backup. Can you check if it has duplicate keys for the table wp_wc_motionpay_loginfo ?

                  d19dotcaD Offline
                  d19dotcaD Offline
                  d19dotca
                  wrote on last edited by d19dotca
                  #10

                  @girish Okay I talked to the developer of the MotionPay plugin, and he says that the table is just a log table and isn't critical, so suggested I just drop the table which I've now done and backed up and cloned successfully - so it's working now. 🙂

                  Still very strange, I suspect I may need to drop that table every time I go to clone that site, which is going to be an annoyance but not a biggie. So I guess this isn't really an issue anymore, and I suppose isn't a Cloudron issue but was a MySQL one specifically caused by the MotionPay plugin and how it creates it's data.

                  Still weird it was even ever allowed to create duplicate keys though in the first place, it's all kind of weird to me, I don't quite understand how it happened in the first place, but at least I know what to do in the future now if it happens again.

                  --
                  Dustin Dauncey
                  www.d19.ca

                  girishG 1 Reply Last reply
                  0
                  • d19dotcaD d19dotca

                    @girish Okay I talked to the developer of the MotionPay plugin, and he says that the table is just a log table and isn't critical, so suggested I just drop the table which I've now done and backed up and cloned successfully - so it's working now. 🙂

                    Still very strange, I suspect I may need to drop that table every time I go to clone that site, which is going to be an annoyance but not a biggie. So I guess this isn't really an issue anymore, and I suppose isn't a Cloudron issue but was a MySQL one specifically caused by the MotionPay plugin and how it creates it's data.

                    Still weird it was even ever allowed to create duplicate keys though in the first place, it's all kind of weird to me, I don't quite understand how it happened in the first place, but at least I know what to do in the future now if it happens again.

                    girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by girish
                    #11

                    @d19dotca said in Cannot clone WordPress app, get error: "Addons Error: Error restoring mysql: read ECONNRESET":

                    Still weird it was even ever allowed to create duplicate keys though in the first place

                    I am as puzzled as you are 🙂 I don't understand how one can create a table with duplicate keys which somehow ended up in the dump and thus cannot be restored.

                    1 Reply Last reply
                    0
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #12

                      I will mark this as solved for now but I suspect this will come back some day.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search