Backup Fails - Warning: Error while sending QUERY packet.

Backup Fails - Warning: Error while sending QUERY packet.

by Stephen Bloomer -
Number of replies: 9

I updated to the latest code last week and over the weekend I started getting errors in the backups of two of my course. The regular emails detailing the backup status reported the following

Summary

==================================================

  Courses: 240

  OK: 0

  Skipped: 238

  Error: 0

  Unfinished: 2

  Warning: 0

 

  Some of your courses weren't saved!!

 

I received this email continually, every 30 minutes, over the weekend like it was stuck in a loop.  (Note that the cron job runs every 10 minutes)

 

Looking at the backup logs reports at http://My.site/report/backups/index.php it shows a couple of courses with a status of “Unfinished”.  When I go into the courses all seems fine but if I try and run a backup of the course or if I try and restore a copy of this course from a backup I get an error page showing 2 lines:

 

Error writing to database

Error reading from database

 

Sometimes I also get the added information

Warning: Error while sending QUERY packet. PID=3832 in C:\moodle\lib\dml\mysqli_native_moodle_database.php on line 902

 

Any ideas?

 

Background information

2 servers

Front server is Windows 2008 R2 x64, IIS 7.5, PHP 5.3.8, Moodle 2.3.3+ (Build: 20121123)

Back server is Windows 2008 R2 x64, MySQL 5.1.33,

Server check reports that all is OK

Average of ratings: -
In reply to Stephen Bloomer

Re: Backup Fails - Warning: Error while sending QUERY packet.

by Ken Task -
Picture of Particularly helpful Moodlers

Qualification for this response ... don't run Windows so have not seen that exact error + you asked for 'ideas' ... soooooooo ....

There's something in those 2 specific courses (obviously), but what?

Check moodledata/temp/backup/ folder for 'hashnamed'.log files.  0 byte .log files are successful backups and any .log file with more than 0 bytes indicates issues with associated course.  Open .log files with NotePad and see what they say.  They will provide hints as to module/activity/etc.
IF you see any 'hashnamed' folders by the same name as the .log files those are the temporary folders Moodle uses to build the backup .mbz files.  Inspection of those folders probably wouldn't hurt.
BTW, they can be safely removed from the operating system level.

Also, as your 2 has grown, data has grown so one might need to tweak mysql settings for max_allowed_packets.

If that is the problem one might see references in mysql logs or web error logs
MySQL server's default max_allowed_packet value is 1MB.
See: https://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html

'spirit of sharing', Ken

In reply to Ken Task

Re: Backup Fails - Warning: Error while sending QUERY packet.

by Stephen Bloomer -

Thanks for that.  I will start going through that now

In reply to Stephen Bloomer

Re: Backup Fails - Warning: Error while sending QUERY packet.

by Stephen Bloomer -

Now using Moodle 2.4 but no luck with identifying the cause of the errors.  I tried to attach a copy of the log file but as it's  over 6 meg, it would not let me upload.  I could not find anything in it as it look s like :-

K   §wA              activities/ PK   §wA              activities/assign_15841/ PK   —wA™ ¯žô  â  "   activities/assign_15841/assign.xmlÅUÛnœ0}ÏWX¼§\²ŽÄ:ZEªÔ·JMž+/6V°ÙK¿¾Æ†…½¥R£Mßð9sfÎcÈŸv•@h4WrÄ_¢ ,ãr½^_¾Þãà‰Üå´0|ÃÍq¶æI€*ÅZÝ1Îp€¤,ª5_Ë JØ™.*É0ƹC(÷ì!U‡Y´S’eQ¨V[½JnÐýX>£xy£oÏ/(‰â8]¤qiE¾ P[EÙ¨xƒòЇLÂKÕTÔ¨§ú£ bK÷Z¿©-]4¼6v.ÄÖ¼LxQÝÀ¤Ô€nW×Ý0uWà
ãe#ÂZ'8ÃúPL*ÃK^PãRXKçàÜU¼(8'¼ˆµÀ,EâYÍpŠ#kfÀ†ÑµtQ6ªò’äñqnäjϱn(‚çyèŸ<jxv{¬'`Ö@Šã4Á³$ˆÓ¡
ÎÃsÈ%?ðG§Z´k.ÚÅ,ùºOa·™³,Nƒ?D’»Sýad­³¯øÕ9wŽcÝúÚ‹²À¦ËìÈ
-t/Ë?þÂ#ƒïÛÎnh»¢».Õdä·èàá¶LÜóß°ÚÛËy¥‹ÄzÉp’~¤™ù…f
UUö» ÿÚP ÀV´øõ?öÿë[øÓ' »ÉöóãêÛÿU8ü°ÈPK   —wAÊGóÁZ    $   activities/assign_15841/calendar.xmlMRËjÃ0¼ç+„¹¥ò‹ÆÙ!
½š|€jm\-¹z¸íßw9vo3;³ÚEüøÓwdë”ÑMŸJ@7F*ÝVôzyÙ•ôXo8Œ ½«7„DH”¬h¶O
:Õ°ªEõ©iLÐ{ÉU+Orò~:“ô´KÉëùB²$M9»;c“×X5xœ]o;j$M'œ«¨6;ƒkÝ:óM·­?¼u 0tFÈõÙO°0u2llœý3N¹Û_ãèÅ2®j(Y§J‹bkM%œ=`‚;õä{”f{¥ÞÈÐÁ=8†S­æì_)z”v^èêç}ÆÙ¢x¿¹ÿ –8[i”½êýCæI’—E™àkuuÉ`Åý4³¾ðh•SL·zÀ9vÀ08,™|˜6Dï‚×A˜OÝL—*Ê´ÈÊ<‹aúK1 þ/6°?PK   —wAX`ã›6   =   $   activities/assign_15841/comments.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IÎÏÍMÍ+)2õál PK   —wAœÎ“É8   C   &   activities/assign_15841/completion.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IÎÏ-ÈI-**òô‘¹ PK   —wA-®q¯Q   ‰   #   activities/assign_15841/filters.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IËÌ)*²ãRP€²ã“K2ËR!BúXÄ BÉùyi™é¨Êàb0‘b; PK   —wAÔ½ðÒ  Ä  "   activities/assign_15841/grades.xmlm”Moã †ïýÈêµµïnRÉ¥*­´Rµ—mÎ…‰‹ŠÁ2¸jþý6Ø8­OÌû>3|Œ¡~ølù€ÞJ£ï³ò¶Èhn„ÔÍ}vxù}³ËèU͸“ÒMϼóN¯©Çè(´ÖÇ+…H«ªÊ&MÎ4¦?KAËE'qD|¦f-Ð=çfÐ×AZ:R‘û'RîoJòçé…lŠ²¬ó™NÓݹÚ1Ùc”Úè
(³V6zb‚”RR[Ç4úk»™ YY-uh_¡§EXʭ뜽~ü{x~~¼Ž…Pš’Ðùœ)>(æ°5I‰TäxêãNñP–`e·ì“…ÿä¥5#5-Öˆ\f±85`¯–µD%fpÜ´kfÑVSuØ€‹¹F)Bí Ü ;ÓÓ2R‰±N
6Hs±D‹kššñиÓÂ^ó^Mù»í_‚hi;Åξñq8[ÀeË”MŽ`–"ó&… í³Ã(ÊðwÞ£Ôpÿô`ãhj a‡Nàuò~FÄó¼”ðîmî¢üYÕyª§,^ y’ßÀ³±êæô.,Ì¿ªQóW`|<ò‹×#TRà¾G)2Kد¯ÑPK   —wAÌÂbˆ3   7   #   activities/assign_15841/grading.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²I,JM,Òú PK   —wAîšµs   Û   #   activities/assign_15841/inforef.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²ÉÌKË/JM³ãRP°)-N-‚²¡<ÈÉL±3467°Ñ2 Òú0yfFzQbJj|fIj.Â$„ªyÆÆÈ桪BæƒM*…: PK   —wA|†Ã2   5       activities/assign_15841/logs.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²ÉÉO/Rú` PK   —wAéŠG  +  "   activities/assign_15841/module.xmlu’Ënƒ0E÷ù
„²my$M©Dœ¬ºŠºjÖÁ:’È’þ}m‡—›tç9÷Ì còÝ•³ ¥QŠm˜<Ça ¢”Eµ
ŸïOY¸#‹œKÚ2ç%['áÔ“ÆIo’×8É"zUH¡5V"fÈÊÆ´"%é&Éòhªg©hù yãXi_,÷ÇÃa¿Ì£Ù¼ (IVë,Y§Ù*Í£qãK©€Äf¬;¸q‚‚h,ëOv¨ñÄœ9gX23LleÃJɶ6뺦bŒÌRÍGÙ­šúÀ¾¿–‚ýLí3fÅRòšÝ†Uf•Vª €
ð»5ýïø:„‹ÿG| ®µ¹ ¾8Rw]¬0+:+É­çOiEƒÌsnÄÝÚ·¼ô6nCwl)èRa=¬é/š=Ôõ}¡8KG£xø{É/PK   —wA—8ÓäT   ‰   !   activities/assign_15841/roles.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²)ÊÏI-¶ãRP ³âó:Š2S BúXÄÀB‰ÅÅ™éy¹©y%È
QD!bÅv PK   §wA              activities/assign_15842/ PK   —wAùƒwõ  â  "   activities/assign_15842/assign.xmlÅUM›0½ï¯°¸oÁ@6D"^E+Uê­RwÏ•ƒÖª±6ù误±C _[©UÚ~oÞÌ›aùó®h­æJ.ü)
ÈB1.«eðöúù1žÉCNÃ7ÜìgËàiž¨V¬Ðñ,Kã´†e@µæ•P¡¤é£âY–-ò€PîÙcª³h¯$«¢P4¶:z“Ü }[½ ¼zÄèËË+Š#ŒóÐEz—¦Uä« ªuP”Šwh!}È$¼TmM
‰Ôáè¨ØÒ½ÖïjË@-oŒ±5¯^Ô´°i5 »uÍu?LݸÁxÙˆ°––Æ .°C(H&•á%/¨q)¬¥Kpî+^\^Ä:`–"8‰¢$K³Èš°a4Bm']”­ª½$^,æVÐKnùUKlž‡þÉ£†×`·Çzf
¤Nã,‰óð„8Úà<¼„\ò#rjDWqùÝ.fÉ«x»ÍLfxü1‚”\Ø:FÖz0ûˆ_íÑ‘sç˜1Ö­¯½(klºÌŽÜPÑAÿ²üÃà/<1ø¡í8º£íšîúT“‘ߣ|ß&îùOXïíå¼ÑE<ÃO³,Nÿ¦™øJ3…ªkû]пm¨`kZüø{”üé[ø¦Ï@w“íçÇÕ·ÿ«pøa‘_PK   —wA+hÈì[    $   activities/assign_15842/calendar.xmlMRËnƒ0¼ç+,rKÍ«
RQ©Ro•š| Åj lêmÿ¾&ÛÌάwge~üíZ2€±R«‚ÆO% j-¤j
z½¼îrz,7PΖB$R4ÙGÏt¬aUU”§ºÖ^9ì%W%IÉÇéLâÓ.&oçI¢8ælr†&¶6²w8»Ü¶î ä@궲¶ Jï4®ukõÝ6îðÞBeø¾Õ•XŸýc'ÃÖÑÆÙã›aÊM›®r%ŽžQ(ãªÆ‚eœ¡´° 6FûYÄÙÁ[0cOºGi&A1ÐCåBÏ‚ƒÔiá[˜‚c8Ù(ÎJÁ#•u•ª¡|Ù§œ-,ˆÓÍÝ_¥ðÀÙJƒìdè72¢4Ïò—X««KxSM§™õ…Ë ­üla¼Õα=†ÁÀ~ÉdáÛø!z¼Â|ò&a¼T–ÇY’§I˜¸ã_
Ið±ùƒýPK   —wAX`ã›6   =   $   activities/assign_15842/comments.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IÎÏÍMÍ+)2õál PK   —wAœÎ“É8   C   &   activities/assign_15842/completion.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IÎÏ-ÈI-**òô‘¹ PK   —wA-®q¯Q   ‰   #   activities/assign_15842/filters.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IËÌ)*²ãRP€²ã“K2ËR!BúXÄ BÉùyi™é¨Êàb0‘b; PK   —wA¥*®ƒ]   —   "   activities/assign_15842/grades.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IL.É,Ë,©ŒO/JLIMÊÏ϶ãRP°óâ3KRs‹Á|}t?'µ¤h²¸>³PK   —wAÌÂbˆ3   7   #   activities/assign_15842/grading.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²I,JM,Òú PK   —wAãÈOOX      #   activities/assign_15842/inforef.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²ÉÌKË/JM³ãRP°)-N-‚²¡<ÈÉL±3467°Ñ2 Òú0y¬(
5 PK   —wA|†Ã2   5       activities/assign_15842/logs.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²ÉÉO/Rú` PK   —wAâXG  +  "   activities/assign_15842/module.xmlu’Ënƒ0E÷ù
„²my$M©Dœ¬ºŠºjÖÁ:’È’þ}m‡—›tç9÷Ì còÝ•³ ¥QŠm˜<Ça ¢”Eµ
ŸïOY¸#‹œKÚ2ç%[§áÔ“ÆIo’×8É"zUH¡5V"fÈÊÆ´"%é&Éòhªg©hù yãXi_,÷ÇÃa¿Ì£Ù¼ (IVë,Y§Ù*Í£qãK©€Äf¬;¸q‚‚h,ëOv¨ñÄœ9gX23LleÃJɶ6뺦bŒÌRÍGÙ­šúÀ¾¿–‚ýLí3fÅRòšÝ†Uf•Vª €
ð»5ýïø:„‹ÿG| ®µ¹ ¾8Rw]¬0+:+É­çOiEƒÌsnÄÝÚ·¼ô6nCwl)èRa=¬é/š=Ôõ}¡8KG£xø{É/PK   —wA—8ÓäT   ‰   !   activities/assign_15842/roles.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²)ÊÏI-¶ãRP ³âó:Š2S BúXÄÀB‰ÅÅ™éy¹©y%È
QD!bÅv PK   §wA              activities/folder_13102/ PK   •wANn\í4   9   $   activities/folder_13102/calendar.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²I-KÍ+)2ô¡, PK   •wAX`ã›6   =   $   activities/folder_13102/comments.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IÎÏÍMÍ+)2õál PK   •wAœÎ“É8   C   &   activities/folder_13102/completion.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IÎÏ-ÈI-**òô‘¹ PK   •wA-®q¯Q   ‰   #   activities/folder_13102/filters.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IËÌ)*²ãRP€²ã“K2ËR!BúXÄ BÉùyi™é¨Êàb0‘b; PK   •wAN½s0Ü   v  "   activities/folder_13102/folder.xml}PKnÂ0ÝsŠ‘ìZÇIŠ‚pÌ¢R/Pz€(žÐ‘üAéÑÛ×Æ€ÚMwž÷“ßÓû‹w°àüE1ôB=W0ŒÑR8öâãðöÔ‰½YéadZˆ¿l/6ªà£=;̧jTUß0xìÅÅYÀã…³ª®»M+Ì
@ö•±„f§yýNœ¸Þ£;sú¼ 
pH)Z^%EMçhÖŽw§õ‘wÿù²H^UZÛ¯ˆ)Î~`£nÔí,‚Ê»döñ.“ÇT˜&BkTSo›v«ºJË?D.+KÛ´¡¼h~ PK   •wA¥*®ƒ]   —   "   activities/folder_13102/grades.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IL.É,Ë,©ŒO/JLIMÊÏ϶ãRP°óâ3KRs‹Á|}t?'µ¤h²¸>³PK   •wARyRq   ˆ  #   activities/folder_13102/inforef.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²ÉÌKË/JM³ãRP°IËÌI…²¡<ÈÉL±376±0±Ñ² òúXÕš’ ÖŒµæ$¨µ A­%ñj-
°©…°À”††+ PK   •wA|†Ã2   5       activities/folder_13102/logs.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²ÉÉO/Rú` PK   •wA°o¶H  #  "   activities/folder_13102/module.xmlm’MoÂ0†ïüŠªâº5)©N;¡Æy*a–Ò¤J?`ÿ~Iú•°Ýìç}íÔv³ý½QºF%w1}&q²PåuŸ>ߟ6ñž-²RñV@„ÜxV”¤ñ\“š’5}#$f‹(¬2/]”à ³ÄCÖQCјRä,]Ó×,™sO•myÍÖ“< kA>$Y2…–çœgt•nW/[º!YÒ׶P˜A}àÚH²±lˆ,ì°Æ³ F³d=lò›YñªU[™!]ÿ9™$³L3ܨõÙ\öûk%ÅÏ\î1k,TY °[°/Å«Î9`å°“åáãt<–~É£'ìÐ!ÜÂ' Mp¯ÌI€‡Æ‰ºKt9ŠÜ¬è¢Ui}!,­lPžž¸«}«Û€Q`ã6ô‡Fu¡±×ôˆ¼G]ÝÊ‹r4ù-ûPK   •wA—8ÓäT   ‰   !   activities/folder_13102/roles.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²)ÊÏI-¶ãRP ³âó:Š2S BúXÄÀB‰ÅÅ™éy¹©y%È
QD!bÅv PK   §wA              activities/folder_13198/ PK   •wANn\í4   9   $   activities/folder_13198/calendar.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²I-KÍ+)2ô¡, PK   •wAX`ã›6   =   $   activities/folder_13198/comments.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IÎÏÍMÍ+)2õál PK   •wAœÎ“É8   C   &   activities/folder_13198/completion.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IÎÏ-ÈI-**òô‘¹ PK   •wA-®q¯Q   ‰   #   activities/folder_13198/filters.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IËÌ)*²ãRP€²ã“K2ËR!BúXÄ BÉùyi™é¨Êàb0‘b; PK   •wA¶¼ÖˆÞ   g  "   activities/folder_13198/folder.xmlUMnÂ0…÷œbä;j»)„cU{ÒD±#ù™!‚Û×Ƶ;ÏûÞŒüžÚ]½ƒÑ¦3ÆÐ2ù"ØÐGƒáвŸý×bÍvz¦ºžpDºš–­ä†æâle#7ë§:o[6DglbÐÇ@öJÅõÚˆ7Éô@U:*ZV˦þ8v'Êl ßÑ](êK:§ °Ï—¿ÛêJQÏmOóm§¢ð»¤xõüñ1ùŽ´| ÇX
ÉŽXŠ(tzWDèmNˆZ£eÓˆfõ.„Pü(éx—KãÏÖô/PK   •wA¥*®ƒ]   —   "   activities/folder_13198/grades.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²IL.É,Ë,©ŒO/JLIMÊÏ϶ãRP°óâ3KRs‹Á|}t?'µ¤h²¸>³PK   •wA¿¡Œñn   \  #   activities/folder_13198/inforef.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²ÉÌKË/JM³ãRP°IËÌI…²¡<ÈÉL±3771µ°Ñ² òúXÕZ¯ÖÌ€µ†$¨5"A­16µ8P€Òа PK   •wA|†Ã2   5       activities/folder_13198/logs.xml³±¯ÈÍQ(K-*ÎÌϳU2Ô3PRHÍKÎOÉÌK·U
qÓµP²·ã²ÉÉO/Rú` PK   •wAÞ'¨ºG  #  "   activities/folder_13198/module.x

In reply to Stephen Bloomer

Re: Backup Fails - Warning: Error while sending QUERY packet.

by Ken Task -
Picture of Particularly helpful Moodlers

Strange ... on a Linux box, the data/temp/backup/ directory on a 2.4 not having issues shows log files like:

699f1b0851f0dff3f7701e7a6fe6f52b.log

[root@sos backup]# ls -l
total 0
-rw-rw-rw- 1 apache apache 0 Dec  4 17:41 699f1b0851f0dff3f7701e7a6fe6f52b.log

And that contains 0 bytes ... ie, nothing in it ... indicating a successful backup.

If you find a log file in that location, in previous versions of Moodle, they would be text (NOT zipped) and opening one in a text editor was all that was needed to inspect.  So open NotePad first, then have it look for .log files in the appropriate directory.

Let's have a look see at your DB:

select * from mdl_files where component="backup";

From the looks of what was copied and pasted, was a file with a hashname like 699f1b0851f0dff3f7701e7a6fe6f52b opened? or attempted to open it?  That really might be a hash named *zip* file.

Copy that hash named file out into a temp directory.  Rename it:

699f1b0851f0dff3f7701e7a6fe6f52b to 699f1b0851f0dff3f7701e7a6fe6f52b.zip

and unzip it.

It is the failed backup, BTW.  Inspection of it can sometimes help find a clue as to what is NOT being backed up.

Also suggest turning on debugging and run a backup to see what it says.

'spirit of sharing', Ken

NOTE: can't believe no Windows users bother to respond!  Shame on them!

 

Average of ratings: Useful (1)
In reply to Ken Task

Re: Backup Fails - Warning: Error while sending QUERY packet.

by Stephen Bloomer -

Thanks for the info.  I managed to spend a bit of time on it today, but not enough.  It looks like what I thought was a backup log was not and adding the .zip helped there.  I have dumped the data from MySQL but not had the time to go through it as yet.

Debug was set to all and this showed only two lines when I tried the backup, "Error writing to database" and "Error reading from database".  Changing debug to Developer gave the following when I tried to do a manual backup of one of the course:-

Error writing to database Debug info: MySQL server has gone away INSERT INTO mdl_backup_controllers (backupid,operation,type,itemid,format,interactive,purpose,userid,status,execution,executiontime,checksum,controller,timecreated,timemodified) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [array ( 0 => '8f057ac415a2423123f31d7af7478f8e', 1 => 'backup', 2 => 'course', 3 => 141, 4 => 'moodle2', 5 => 1, 6 => 10, 7 => '1370', 8 => 500, 9 => 1, 10 => 0, 11 => '391b9edf378a74ea52cb0af8687fef03', 12 => lots of stuff that goes on in line 12 13 => 1355280794, 14 => 0, )] Error code: dmlwriteexception Stack trace: line 429 of \lib\dml\moodle_database.php: dml_write_exception thrown line 1107 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end() line 1149 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw() line 87 of \backup\util\dbops\backup_controller_dbops.class.php: call to mysqli_native_moodle_database->insert_record() line 333 of \backup\controller\backup_controller.class.php: call to backup_controller_dbops::save_controller() line 137 of \backup\util\ui\base_ui.class.php: call to backup_controller->save_controller() line 91 of \backup\backup.php: call to base_ui->save_controller()

 

Error Reading from database Debug info: MySQL server has gone away SELECT bi.id, bp.id AS blockpositionid, bi.blockname, bi.parentcontextid, bi.showinsubcontexts, bi.pagetypepattern, bi.subpagepattern, bi.defaultregion, bi.defaultweight, COALESCE(bp.visible, 1) AS visible, COALESCE(bp.region, bi.defaultregion) AS region, COALESCE(bp.weight, bi.defaultweight) AS weight, bi.configdata , ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, ctx.instanceid AS ctxinstance

FROM mdl_block_instances bi JOIN mdl_block b ON bi.blockname = b.name LEFT JOIN mdl_block_positions bp ON bp.blockinstanceid = bi.id AND bp.contextid = ? AND bp.pagetype = ? AND bp.subpage = ? LEFT JOIN mdl_context ctx ON (ctx.instanceid = bi.id AND ctx.contextlevel = 80)

WHERE (bi.parentcontextid = ? OR (bi.showinsubcontexts = 1 AND bi.parentcontextid IN (?,?,?))) AND bi.pagetypepattern IN (?,?,?,?) AND (bi.subpagepattern IS NULL OR bi.subpagepattern = ?) AND (bp.visible = 1 OR bp.visible IS NULL) AND b.visible = 1

ORDER BY COALESCE(bp.region, bi.defaultregion), COALESCE(bp.weight, bi.defaultweight), bi.id [array ( 0 => '10582', 1 => 'backup-backup', 2 => '', 3 => '10582', 4 => '10607', 5 => '1280', 6 => '1', 7 => 'backup-backup', 8 => 'backup-backup-*', 9 => 'backup-*', 10 => '*', 11 => '', )] Error code: dmlreadexception Stack trace: line 426 of \lib\dml\moodle_database.php: dml_read_exception thrown line 960 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end() line 628 of \lib\blocklib.php: call to mysqli_native_moodle_database->get_recordset_sql() line 1373 of \lib\pagelib.php: call to block_manager->load_blocks() line 829 of \lib\pagelib.php: call to moodle_page->starting_output() line 729 of \lib\outputrenderers.php: call to moodle_page->set_state() line 2362 of \lib\outputrenderers.php: call to core_renderer->header() line 366 of \lib\setuplib.php: call to core_renderer->fatal_error() line ? of unknownfile: call to default_exception_handler()

 

 

I hope to spend some more time on it tomorrow. 

In reply to Stephen Bloomer

Re: Backup Fails - Warning: Error while sending QUERY packet.

by Ken Task -
Picture of Particularly helpful Moodlers

The first 'MySQL server has gone away' tells the tale.  Before you begin again tomorrow, set ‘max_allowed_packet’ in MySQL to 16M.  Restart the MySQL service.

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Backup Fails - Warning: Error while sending QUERY packet.

by Stephen Bloomer -

Thank you so much for your assistance.  Yes "max_allowed_packet’ was the answer to my issues.

A bit embarrassing that I could not see this.   In the past I lived this stuff, now l live with paperwork and politics.  Thanks again

In reply to Stephen Bloomer

Re: Backup Fails - Warning: Error while sending QUERY packet.

by Ken Task -
Picture of Particularly helpful Moodlers

Welcome.  No need to be 'red-in-face' considering 'paperwork and politics'. ;)

'spirit of sharing', Ken

In reply to Ken Task

Error while sending QUERY packet.

by Diana Diana -

Hy,
It is come all the time this error and i set set 'max_allowed_packet' in MySQL to 128M.
What do you think is the problem?
Thank you!
Error while sending QUERY packet. PID=26714

/home/findiagr/_fws/yii/framework/db/CDbCommand.php(508)

496                 Yii::trace('Query result found in cache','system.db.CDbCommand');
497                 return $result[0];
498             }
499         }
500 
501         try
502         {
503             if($this->_connection->enableProfiling)
504                 Yii::beginProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
505 
506             $this->prepare();
507             if($params===array())
508                 $this->_statement->execute();
509             else
510                 $this->_statement->execute($params);
511 
512             if($method==='')
513                 $result=new CDbDataReader($this);
514             else
515             {
516                 $mode=(array)$mode;
517                 call_user_func_array(array($this->_statement, 'setFetchMode'), $mode);
518                 $result=$this->_statement->$method();
519                 $this->_statement->closeCursor();
520             }