SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 272
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PackService.php line 210 and reproduce the failure using the backup:point:pack command, then inspect the generated log. Also read EncryptService.php line 211, where the repeated openssl_encrypt() warning is reported; done means the backup point packs without the MySQL 2006 error or this warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100