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

v3.24.1-b3234 EOD PHPupload dayfile.txt not uploading

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
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

v3.24.1-b3234 EOD PHPupload dayfile.txt not uploading

Post by PaulMy »

Hi,
All the extra web files are being updated except dayfile.txt
I have many to upload at realtime and at the 5-minute interval, and 3 at End of Day. Two of the EoD upload ok at midnight but dayfile.txt has failed the last 3 days:

Code: Select all

2023-03-14 00:00:01.770 PHP[Int]: Uploading dayfile.txt

Code: Select all

2023-03-14 00:00:12.565 PHP[Int]: dayfile.txt: Response code = 422: 422
2023-03-14 00:00:12.565 PHP[Int]: dayfile.txt: Response text follows:
Error: TimeStamp is out of date
Data TS   = 1678766401
Server TS = 1678766413

2023-03-14 00:00:12.565 PHP[Int]: Upload process complete
The dayfile.txt is quite large at 1,517,800
The next largest file is alldailytempdata.json at 1,311,550 and this is uploading.
Could the size affect the TimeStamp discrepancy?

Enjoy,
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
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: v3.24.1-b3234 EOD PHPupload dayfile.txt not uploading

Post by mcrossley »

Possibly - the error message is saying there is a 12 second difference between the timestamp on CMX and your web server. But because of the way PHP works with web servers, it cannot check the timestamp on the server until all the file content is uploaded.

I do have a ToDo already about this, but that doesn't help you [now] with your massive dayfile ;)

Your only option would be to increase the allowed time window from 10 seconds to say 15 - line 79 of upload.php.


[Ideally I would use a two-step upload known as 100 Continue. This allows you to send the request headers, the server checks these are Ok and sends back a 100 continue message, then CMX would upload the data. It avoids this type of issue where you waste time and bandwidth sending all the data, only for it to be rejected when a check fails. Unfortunately, you cannot use that protocol with PHP :cry: ]
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: v3.24.1-b3234 EOD PHPupload dayfile.txt not uploading

Post by PaulMy »

Thanks Mark.
I hadn't detected/understood that 12 seconds difference. I've changed upload.php and will see test result after midnight.

Enjoy,
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: v3.24.1-b3234 EOD PHPupload dayfile.txt not uploading

Post by freddie »

For something like the dayfile, could just the delta be uploaded?
Freddie
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: v3.24.1-b3234 EOD PHPupload dayfile.txt not uploading

Post by mcrossley »

freddie wrote: Tue 14 Mar 2023 6:13 pm For something like the dayfile, could just the delta be uploaded?
see...
mcrossley wrote: Tue 14 Mar 2023 3:45 pm I do have a ToDo already about this, but that doesn't help you [now] with your massive dayfile ;)
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: v3.24.1-b3234 EOD PHPupload dayfile.txt not uploading

Post by freddie »

Fair enough :D
Freddie
Image
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: v3.24.1-b3234 EOD PHP upload dayfile.txt not uploading - Resolved

Post by PaulMy »

I can confirm that dayfile.txt was uploaded at midnight rollover after changing line 79 in upload.php from 10 to 15

Code: Select all

if (abs($receivedTime - $requestTime) > 15) {

MXdiags:

Code: Select all

2023-03-15 00:00:01.757 PHP[Int]: Upload process starting
2023-03-15 00:00:01.760 PHP[Int]: Uploading Extra file[0]: C:\KomokaWeather\CumulusMXwll\data\dayfile.txt

2023-03-15 00:00:02.167 PHP[Int]: Uploading dayfile.txt

2023-03-15 00:00:10.731 PHP[Int]: dayfile.txt: Response code = 200: OK
2023-03-15 00:00:10.731 PHP[Int]: dayfile.txt: Response text follows:
Unzipping data
Opening text file dayfile.txt for replacement
Writing text file dayfile.txt
Write complete
Enjoy,
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
Post Reply