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

Highcharts realtime.log size limitation

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
User avatar
kingqueen
Posts: 60
Joined: Tue 26 Feb 2013 6:52 pm
Weather Station: Maplin N96GY / Fine Offset 1081
Operating System: Windows 7 HP 64 bit
Location: Wetherby, UK
Contact:

Highcharts realtime.log size limitation

Post by kingqueen »

This is just in case it's off use to anybody,

I increased the number of measurements saved in realtime.log for the 96 hour Tnet graph. At 1 per minute, that made the log file very very long.

Turns out highcharts doesn't cope once the file gets above a certain size, it shows a graph with axes but no data.

Cutting the file size made the graphs come back. Changing to 5 minute interval in the log should prevent it getting that big again

That took some troubleshooting so I thought I'd post here in case it's of use to anybody else!

Cheers
Image
User avatar
kingqueen
Posts: 60
Joined: Tue 26 Feb 2013 6:52 pm
Weather Station: Maplin N96GY / Fine Offset 1081
Operating System: Windows 7 HP 64 bit
Location: Wetherby, UK
Contact:

Re: Highcharts realtime.log size limitation

Post by kingqueen »

speaking of which, random question: does anybody know - or know how I can find out - how long realtime.log can be before Cumulus falls over?

I suppose the alternative is to have two realtime.log files - hmmm yes that would do it wouldn't it - one for the jpgraphs and one shorter one for the highcharts - with a different cron job and filename for each. I shall implement that.

thanks!
Image
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Highcharts realtime.log size limitation

Post by steve »

Cumulus doesn't know anything about the realtime.log file, so it's not going to affect it no matter how big it gets.
Steve
User avatar
kingqueen
Posts: 60
Joined: Tue 26 Feb 2013 6:52 pm
Weather Station: Maplin N96GY / Fine Offset 1081
Operating System: Windows 7 HP 64 bit
Location: Wetherby, UK
Contact:

Re: Highcharts realtime.log size limitation

Post by kingqueen »

Yes apologies, I had a brain fart, I should have said, how big the realtime.log file gets before highcharts falls over.
Image
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Highcharts realtime.log size limitation

Post by gemini06720 »

kingqueen wrote:I increased the number of measurements saved in realtime.log for the 96 hour Tnet graph. At 1 per minute, that made the log file very very long.

Turns out highcharts doesn't cope once the file gets above a certain size, it shows a graph with axes but no data.
One could always create and run a PHP script once a day (a CRON job on an Apache web server) to truncate (reduce) the file to a size that is acceptable by the Highcharts scripts... ;)
water01
Posts: 3670
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Highcharts realtime.log size limitation

Post by water01 »

Turns out highcharts doesn't cope once the file gets above a certain size, it shows a graph with axes but no data.
As far as can find out there is no limit on the number of plot points (i.e. there is an example of a Highchart/Histock chart plotting 1.7 million points on their API area). What I think is the problem is the performance which they admit when plotting a lot of points like that takes a considerable time. I also think Mark found this when he tried to plot a lot of his weather data and he had to reduce the number of plot points to make it usuable. So I think that if you had waited the blank chart would have eventually filled out!! I personally use Mark's little DOS batch file to keep the realtime.log file to the level that is required for the Near Realtime plot, couldn't that be extended/modified to provide what you want?

By the way what is the Tnet graph?
David
Image
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: Highcharts realtime.log size limitation

Post by mcrossley »

Hi, David is correct, the Highcharts demo site shows a graph with 1.7 million data points. Highcharts itself makes an attempt to decimate points that will not be visible after the number reaches a configurable limit. The other limitation is the browser and host machine. Each data point on the chart is another DOM element on the page.

My PHP scripts that query a SQL database have a parameter that lets the script return every nth row. I use that on my 72 hour charts sourced from 1 minute data to thin the data down a bit - and reduce the returned data size.
Last edited by mcrossley on Tue 26 Mar 2013 1:50 pm, edited 1 time in total.
User avatar
kingqueen
Posts: 60
Joined: Tue 26 Feb 2013 6:52 pm
Weather Station: Maplin N96GY / Fine Offset 1081
Operating System: Windows 7 HP 64 bit
Location: Wetherby, UK
Contact:

Re: Highcharts realtime.log size limitation

Post by kingqueen »

water01 wrote:So I think that if you had waited the blank chart would have eventually filled out!!
No; there's definitely a "cut off" point whereby it just stops working, I left the page open for some time (an hour?) It doesn't seem to be the number of points on one graph either; I had only set it to plot two days data, 2880 points per series, which it quite happily does if the log file is only 2880 lines long, but not if it's 5760 lines long even though it's only plotting the same number.

Thanks for the suggestions everybody but I had already sorted the problem by using a cron job to restrict the file to a sensible size, and having a separate file for the other graphs. I posted here just because it took some head scratching to work out what was going wrong, with no error messages. Thought it might help A N Other person to know that if your Highcharts weather graph just displays axes and no data, the size of the log file might be responsible.
water01 wrote:By the way what is the Tnet graph?
"TNET Cumulus JpGraph". I haven't played with mine yet or put them in my website as I would like to tweak their appearance, but here are the sample graphs for my data.
Image
Post Reply