Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

MySQL upload failing

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
User avatar
billy
Posts: 260
Joined: Mon 30 Nov 2015 10:54 am
Weather Station: WLL / Davis VP2+
Operating System: RPi-4 bookworm
Location: Gooseberry Hill, Western Australia

MySQL upload failing

Post by billy »

Early this morning my one minute MySQL up-load failed. This has happened before. In the past (b3184 and before) this would quickly sort itself out and the upload would resume without my involvement. More recently a few have continued to fail until a restart.

This seems similar to the ftp upload problems I had in recent times that have been corrected with b3194 - see viewtopic.php?t=20525

Attached is the (edited) diag file. The last successful upload had a LogDateTime of 2022-07-17 00:34:00

In the early hours of the morning my ftp uploads, especially the realtime ones, often struggle to complete before the next cycle begins and this is often ... though not always ... the time the MySQL failures occurs

The log (5') and dayfile uploads happily continue despite the one minute's problems.
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MySQL upload failing

Post by mcrossley »

Thanks for the report. And yes there is a bug in there - the buffered failed commands are never removed from the list once they have executed OK so it keeps retrying the first one for ever. :bash:
User avatar
billy
Posts: 260
Joined: Mon 30 Nov 2015 10:54 am
Weather Station: WLL / Davis VP2+
Operating System: RPi-4 bookworm
Location: Gooseberry Hill, Western Australia

Re: MySQL upload failing

Post by billy »

Sorry to cause you problems but pleased you have worked out the cause. Also, the error doesn't trigger an alarm unlike the ones that stall then recover.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MySQL upload failing

Post by mcrossley »

Because it was a bug the whole error handling was thrown out. Until this is fixed in the next release you could disable the "buffer on failure" feature if you have the odd issues with the MySQL connectivity. That way you may miss the odd update, but it should not get caught in this loop of always applying the same insert.
User avatar
billy
Posts: 260
Joined: Mon 30 Nov 2015 10:54 am
Weather Station: WLL / Davis VP2+
Operating System: RPi-4 bookworm
Location: Gooseberry Hill, Western Australia

Re: MySQL upload failing

Post by billy »

Thanks - I've disabled the buffer on failure
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: MySQL upload failing

Post by sfws »

(post deleted, because quoted facts rejected)
Last edited by sfws on Mon 18 Jul 2022 6:59 pm, edited 1 time in total.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MySQL upload failing

Post by mcrossley »

Syntax errors ARE filtered out and not put in the failed buffer.

I see the user changing a table name as something a bit silly on do the fly, and a *very* edge case. You would hope that anyone changing their SQL schema would do so with CMX stopped - or at least not using it. So I will ignore this theoretical issue as I think it is unlikely - ha ha, never underestimate a humans ability to do the opposite of what you expect!

But you are correct, error conditions other than syntax could/should probably be checked, if you have suggestions as to errors that should not be buffered please make them. But on the whole the feature I think is a good one. I'm testing the bug fix now and it is recovering correctly when I remove/restore access to my test database.
User avatar
billy
Posts: 260
Joined: Mon 30 Nov 2015 10:54 am
Weather Station: WLL / Davis VP2+
Operating System: RPi-4 bookworm
Location: Gooseberry Hill, Western Australia

Re: MySQL upload failing

Post by billy »

A very belated but big thank you to Mark for sorting out the MySQL upload issues - since b3202 CMX has faultlessly handled all error generated by my system.
Post Reply