Support

Site Restoration

#12043 SQL insert error

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
CMS Type
Other
CMS Version
n/a
Backup Tool Version
n/a
Kickstart version
n/a

support@w3c2i.com
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 1.5.26
PHP version: 5.3.10
MySQL version: 5.5.20
Host: Apache 2.2.21
Akeeba Backup version which took the backup: Akeeba Backup Professional 3.4.3 (2012-03-21)
Kickstart version used to extract the backup: 3.4.1

Description of my issue:

We have an SQL error when restoring database, it is always on a field type mediumblob witch Attributes is BINARY:

Erreur à la ligne 133: INSERT INTO `#__huruhelpdesk_attachments` VALUES ('29', '565', '20101028153033495.pdf', 'application/pdf', '1573732', '%PDF-1.4n%????n4 0 objn< MySQL: MySQL query failed with error 2006 (MySQL server has gone away). The query was:INSERT INTO `kfc_huruhelpdesk_attachments` VALUES ('29', '565', '20101028153033495.pdf', 'application/pdf', '1573732', '%PDF-1.4n%????n4 0 objn<>nstreamn????JFIF,,??Cr2!

[...]

��endstreamnendobjn15 0 objn<>nstreamn0.24000 0 0 0.24000 0 0 cmnqn3508 0 0 2480 0 0 cmn/Im3 DonQnendstreamnendobjn16 0 objn60nendobjn17 0 objn<>n>>nendobjn18 0 objn<>nendobjn3 0 objn<>nendobjn1 0 objn<>nendobjn2 0 objn<>nendobjn%RRR010createpdf*001.00.200**********1000nxrefn0 19n0000000000 65535 f n0001573097 00000 n n0001573183 00000 n n0001573037 00000 n n0000000015 00000 n n0000599081 00000 n n0000599192 00000 n n0000599210 00000 n n0000599275 00000 n n0000599400 00000 n n0001155496 00000 n n0001155609 00000 n n0001155628 00000 n n0001155694 00000 n n0001155822 00000 n n0001572710 00000 n n0001572823 00000 n n0001572842 00000 n n0001572909 00000 n ntrailern<>nstartxrefn1573272n%%EOFn')

The original sql insert is :
id note_id name type size content
29 565 20101028153033495.pdf application/pdf 1573732 [BLOB - 1,5 Mio]

the collation is set to ut8_general_ci for the database and i tried to force utf8 in the ABI.
i don't understand why this insert return error. this error is not return at the first insert in the same table. is there a problem with this type of field ?

Please help!

nicholas
Akeeba Staff
Manager
The error message says that the MySQL server has gone away, which means that your database server closed the connection while we were trying to restore data to it. There are two possibilities:
1. There was a server timeout while restoring data. In ABI's database restoration page please try setting the maximum execution time to 3 seconds (it's the last field at the bottom of the page)
2. It is possible that your new MySQL server has a lower maximum packet size than your original server. In this case, you will not be able to restore that table. In this case, you have to take a new backup skipping that table from the backup.

That said, your helpdesk component is storing attachments in the database. File data has no place in the database, it belongs to files. It's optimal to have the ticket system save attachments as files, not as database records.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

support@w3c2i.com
Same problem with other maximum execution time.
But i now have increase my max_allowed_packet to 3M and it is OK !
It was just a Mysql server config solve!

Thank you very much for the right way :)

nicholas
Akeeba Staff
Manager
You're welcome!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: Typically we work Monday to Friday, 9am to 7pm Cyprus timezone (EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets, but we cannot respond to them, outside of our working hours.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!

Summer vacations: Our support will be closed for replies and new tickets from August 6th to August 21st, 2022 due to summer vacations.