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

Problem (or not?)

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
philpugh
Posts: 428
Joined: Tue 24 May 2011 8:34 am
Weather Station: See Signature
Operating System: Debian 12 (RPi5)
Location: Antrobus, Cheshire, UK
Contact:

Problem (or not?)

Post by philpugh »

I run my main CumulusMX station on a RPi 4 alongside my web server (NginX) and MariaDb.

Checking the logs on my server I notice that MySQL is racking up an error for each update to the Monthly table.

The error is
2021-08-24 13:55:01 2044 [Warning] Aborted connection 2044 to db: 'weather' user: '***********' host: 'localhost' (Got an error reading communication packets)
The relevant section of MXdiags log (with debug and data logging) is:
2021-08-24 13:54:45.622 ProcessData: Processing posted data
2021-08-24 13:54:45.622 ProcessData: Payload = PASSKEY=********************************&stationtype=GW1000A_V1.6.8&dateutc=2021-08-24+12:54:44&tempinf=68.7&humidityin=70&baromrelin=30.457&baromabsin=30.292&tempf=66.9&humidity=67&winddir=24&windspeedmph=3.58&windgustmph=5.82&maxdailygust=9.17&solarradiation=234.15&uv=2&rainratein=0.000&eventrainin=0.000&hourlyrainin=0.000&dailyrainin=0.000&weeklyrainin=0.118&monthlyrainin=3.598&yearlyrainin=30.079&totalrainin=30.079&temp1f=74.30&humidity1=60&temp2f=68.54&lightning_time=1629774669&lightning_num=1&lightning=37&wh65batt=0&batt1=0&batt2=0&wh57batt=4&freq=868M&model=GW1000_Pro
2021-08-24 13:54:45.624 ProcessData: StationType = GW1000A_V1.6.8, Model = GW1000_Pro, Frequency = 868MHz
2021-08-24 13:54:45.629 ProcessData: Complete
2021-08-24 13:54:46.634 Realtime[138]: Start cycle
2021-08-24 13:54:46.634 Realtime[138]: Creating realtime.txt
2021-08-24 13:54:46.635 Realtime[138]: Processing realtime file - realtimegauges.txt
2021-08-24 13:54:46.641 Realtime[138]: Processing extra file[1] - web/realtimegaugesT.txt
2021-08-24 13:54:46.647 Realtime[138]: Processing extra file[2] - web/realtimeclockT.txt
2021-08-24 13:54:46.650 Realtime[138]: Uploading - realtime.txt
2021-08-24 13:54:46.659 Realtime[138]: Uploading - realtimegauges.txt
2021-08-24 13:54:46.670 Realtime[138]: Uploading extra web file[1] web/realtimegaugesT.txttmp to /var/www/html/ecowitt/realtimegauges.txt
2021-08-24 13:54:46.680 Realtime[138]: Uploading extra web file[2] web/realtimeclockT.txttmp to /var/www/html/ecowitt/realtimeclock.txt
2021-08-24 13:54:46.689 Realtime[138]: End cycle
2021-08-24 13:55:00.157 DoLogFile: Writing log entry for 24/08/2021 13:55:00
2021-08-24 13:55:00.157 DoLogFile: max gust: 9
2021-08-24 13:55:00.157 DoLogFile: log entry for 24/08/2021 13:55:00 written
2021-08-24 13:55:00.159 Writing today.ini, LastUpdateTime = 24/08/2021 13:55:00 raindaystart = 764.0066 rain counter = 764.0066
2021-08-24 13:55:00.160 DoExtraLogFile: Writing log entry for 24/08/2021 13:55:00
2021-08-24 13:55:00.161 DoExtraLogFile: Log entry for 24/08/2021 13:55:00 written
2021-08-24 13:55:00.161 Creating standard web files
2021-08-24 13:55:00.162 Windy: URL = https://stations.windy.com/pws/update/< ... =67&uv=2.0
2021-08-24 13:55:00.163 http://www.pwsweather.com/pwsupdate/pws ... =updateraw
2021-08-24 13:55:00.164 DoLogFile: MySQL executing - INSERT IGNORE INTO Monthly (LogDateTime,Temp,Humidity,Dewpoint,Windspeed,Windgust,Windbearing,RainRate,TodayRainSoFar,Pressure,Raincounter,InsideTemp,InsideHumidity,LatestWindGust,WindChill,HeatIndex,UVindex,SolarRad,Evapotrans,AnnualEvapTran,ApparentTemp,MaxSolarRad,HrsSunShine,CurrWindBearing,RG11rain,RainSinceMidnight,WindbearingSym,CurrWindBearingSym,FeelsLike,Humidex) Values('21-08-24 13:55',19.4,67,13.1,6,9,56,0.0,0.0,1031.4,764.0,20.4,70,6,19.4,19.4,2.0,234,0.00,0.00,18.4,704,0.0,24,0.0,0.0,'NE','NNE',18.7,22.2)
2021-08-24 13:55:00.166 Current CPU temp = 56.5°C
2021-08-24 13:55:00.170 DoLogFile: MySQL 1 rows were affected.
2021-08-24 13:55:00.206 Done creating standard Data file
2021-08-24 13:55:00.207 Creating graph data files
2021-08-24 13:55:00.239 Windy: Response = OK: SUCCESS (valid measurements count: 9, valid station info count: 0)
2021-08-24 13:55:00.557 PWS Response: OK: <html lang="en">
Now it seems to have started around the time I updated to b3143 but I can't be absolutely sure. I don't recall ever seeing this error before.

Now I'm not saying it is due to CumulusMX but other operations on other databases don't seem to be causing the same problem.

Any MySQL 'experts' care to comment please?
Phil Pugh
GW1100 + WH65/WH57/WH31;GW1100 + WS68/WH40A (also with HP25xx console); GW2001 WittBoy
CumulusMX V4 / CUtils V7
Raspberry Pi 5 64bit
https://goosegate.uk/
User avatar
philpugh
Posts: 428
Joined: Tue 24 May 2011 8:34 am
Weather Station: See Signature
Operating System: Debian 12 (RPi5)
Location: Antrobus, Cheshire, UK
Contact:

Re: Problem (or not?)

Post by philpugh »

A thought.

Googling the error gives a myriad of possible causes but I have tried the simpler ones without any affect.

One I can't try is to ensure that the connection is closed correctly after each operation - I'm sure that this is happening?
Phil Pugh
GW1100 + WH65/WH57/WH31;GW1100 + WS68/WH40A (also with HP25xx console); GW2001 WittBoy
CumulusMX V4 / CUtils V7
Raspberry Pi 5 64bit
https://goosegate.uk/
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: Problem (or not?)

Post by mcrossley »

Hi Phil, yes the connection is closed after each insert (or commit if more than record is being added). The SQL connection is also opened in a using block, so should be closed and disposed automatically as the function exits even if the explicit close was not run.
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: Problem (or not?)

Post by mcrossley »

Also, I'm running a pretty identical setup to you - rPi4, MariaDB, Nginx - and not seeing any issues.
User avatar
philpugh
Posts: 428
Joined: Tue 24 May 2011 8:34 am
Weather Station: See Signature
Operating System: Debian 12 (RPi5)
Location: Antrobus, Cheshire, UK
Contact:

Re: Problem (or not?)

Post by philpugh »

Thanks Mark. I never doubted it!

I'll keep on digging.
Phil Pugh
GW1100 + WH65/WH57/WH31;GW1100 + WS68/WH40A (also with HP25xx console); GW2001 WittBoy
CumulusMX V4 / CUtils V7
Raspberry Pi 5 64bit
https://goosegate.uk/
Mapantz
Posts: 1992
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Problem (or not?)

Post by Mapantz »

I wonder if it's anything to do with a setting in you .cnf file?

https://dba.stackexchange.com/questions ... on-packets
Image
User avatar
philpugh
Posts: 428
Joined: Tue 24 May 2011 8:34 am
Weather Station: See Signature
Operating System: Debian 12 (RPi5)
Location: Antrobus, Cheshire, UK
Contact:

Re: Problem (or not?)

Post by philpugh »

Thanks - I had seen that and tried solutions - but none worked.

BUT.. Then i remembered I had rebooted the server and an old bit of python code I had been messing around with earlier this month got re-started and it wasn't closing the database correctly (don't know if there is an EMOJI for extremely embarrassed !) :bash:

Getting older is a wonderful thing but I must remember to tidy up rogue code!
Phil Pugh
GW1100 + WH65/WH57/WH31;GW1100 + WS68/WH40A (also with HP25xx console); GW2001 WittBoy
CumulusMX V4 / CUtils V7
Raspberry Pi 5 64bit
https://goosegate.uk/
Post Reply