Error code: dmlreadexception

Error code: dmlreadexception

by Josefina Osán -
Number of replies: 2

Hello!!

I'm trying to do a backup copy of my courses, and this error appeared :


MySQL server has gone away

SELECT COUNT(*)

FROM mdlry_backup_ids_temp b

JOIN mdlry_user u ON u.id = b.itemid

WHERE b.backupid = ?

AND b.itemname = 'userfinal'

AND u.mnethostid != ?

[array (

0 => '725630442bd0b99c8c9fe308e80ef047',

1 => '1',

)]

Error code: dmlreadexception



Do you know how can I fix this?

Thank you !!

Average of ratings: -
In reply to Josefina Osán

Re: Error code: dmlreadexception

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

The first thing I'd suggest is increasing max_allowed_packet in MySQL. Run:

SHOW GLOBAL VARIABLES LIKE 'max_allowed_packet';

to see what this setting is currently. 16 MB is often recommended when this problem occurs, you can set it with:

SET GLOBAL max_allowed_packet = 16777216;

Change it in the MySQL configuration file (often my.cnf) to make this setting persistent.