backup icon indicating copy to clipboard operation
backup copied to clipboard

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Open CMeierSoftware opened this issue 3 years ago • 2 comments

Hi there, while packing the first pass of a backup the this error occured: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Here is the output:

 > lock and set status to processing
 > Browsing RestoringData data
   > Packing RestoringChunk data-bf2cdafb-eae0-4cf0-b1e6-a69f5d4d4779: proceeding
     * copying chunk to temp file /tmp/php9gg35M: ok
     * compressing /tmp/php9gg35M: /tmp/phpMLuaPP
     * spliting /tmp/phpMLuaPP in parts: 32 part(s)
     * encrypting each part
       . encrypting /tmp/phpi8mBuO: /tmp/phpiG1hRM, aes-256-cbc
       . encrypting /tmp/php6u0maQ: /tmp/phpB2E8hO, aes-256-cbc
       . encrypting /tmp/phpGKmVlM: /tmp/php39ZUfO, aes-256-cbc
       . encrypting /tmp/phpf7rE8P: /tmp/phpSkemtP, aes-256-cbc
       . encrypting /tmp/php8jYzsN: /tmp/php3fXmnM, aes-256-cbc
       . encrypting /tmp/php7w7bUM: /tmp/phpVU7AoP, aes-256-cbc
       . encrypting /tmp/php06qpFO: /tmp/phpZqtStP, aes-256-cbc
       . encrypting /tmp/phplzYEfP: /tmp/phpaLDYSO, aes-256-cbc
       . encrypting /tmp/phpJRY3xM: /tmp/phpY1xOlN, aes-256-cbc
       . encrypting /tmp/phpj9yKNP: /tmp/phptla2lP, aes-256-cbc
       . encrypting /tmp/phpQBpiJL: /tmp/phpEO10QM, aes-256-cbc
       . encrypting /tmp/php0t3kVP: /tmp/phpYQsfCL, aes-256-cbc
       . encrypting /tmp/phpsVsEBP: /tmp/phpKBKW7P, aes-256-cbc
       . encrypting /tmp/php4pXWjM: /tmp/phpTY6qwL, aes-256-cbc
       . encrypting /tmp/phpt22WAL: /tmp/phpiy6oVO, aes-256-cbc
       . encrypting /tmp/phpjGvpYO: /tmp/phprc9L9O, aes-256-cbc
       . encrypting /tmp/php0Fw5xL: /tmp/phpCDxVEP, aes-256-cbc
       . encrypting /tmp/phpSl1uMM: /tmp/phpF9ZFfP, aes-256-cbc
       . encrypting /tmp/phpsg1rtM: /tmp/phpkSgxYN, aes-256-cbc
       . encrypting /tmp/phpktmRBO: /tmp/phpZk0K0O, aes-256-cbc
       . encrypting /tmp/phpWRDpzL: /tmp/php0twgnP, aes-256-cbc
       . encrypting /tmp/phpIzU2IN: /tmp/phpJqT6GL, aes-256-cbc
       . encrypting /tmp/phphYsfLO: /tmp/phpN1u94L, aes-256-cbc
       . encrypting /tmp/phpOEmhWN: /tmp/phpUbpnPP, aes-256-cbc
       . encrypting /tmp/phpoCtptM: /tmp/phpKohG0L, aes-256-cbc
       . encrypting /tmp/phpil2hJL: /tmp/phpyP8GrO, aes-256-cbc
       . encrypting /tmp/phpq0IzEN: /tmp/phpg5HczM, aes-256-cbc
       . encrypting /tmp/phpa3DksN: /tmp/php26W6wM, aes-256-cbc
       . encrypting /tmp/phpDuq2hO: /tmp/phpYAE3WP, aes-256-cbc
       . encrypting /tmp/phpbf54xP: /tmp/phpEUb2pN, aes-256-cbc
       . encrypting /tmp/php5HrT5N: /tmp/phpzLxYnM, aes-256-cbc
       . encrypting /tmp/phpZvrgeM: /tmp/phpMCzXsO, aes-256-cbc
     - storing parts in appdata .fail An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

In PackService.php line 210:

  issue on chunk data-bf2cdafb-eae0-4cf0-b1e6-a69f5d4d4779 - An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away


backup:point:pack [--output [OUTPUT]] [--generate-log] [--] <pointId>

The creation was successfully. Using NC 23.0.0.10 and Backup 1.0.4

EDIT: the generted log:

[PHP] Fehler: openssl_encrypt(): IV passed is only 12 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 at nextcloud/apps/backup/lib/Service/EncryptService.php#211 This Error occures several times

CMeierSoftware avatar Jan 18 '22 08:01 CMeierSoftware

Hey,

it seems like your database server was not available. Is the DB Server on the same server as nextcloud or is that running on a different host in a different container? Please also check the timeout settings of your DB server as well as the max_allowed_packages.

mastermns avatar Jan 19 '22 21:01 mastermns

Hi, DB is at the same hoster. I guess ts on the same server, because of using "localhost". max_allowed_packages: 67.108.864 connect timeout: 10 wait timeout: 120

CMeierSoftware avatar Jan 23 '22 09:01 CMeierSoftware