VP2 archive read timing out
Posted: Thu 25 Jul 2019 8:39 am
MX lost connection to my VP2 last night. I restarted it first thing this morning, and it failed to read the archive. So I restarted again (after copying backup data files back to the data folder). Same thing happened again. This is what gets logged in the diags file:
Looking at the log times for waiting for ACK after sending date/time of last record, it doesn't appear to wait for long enough. I don't have this problem for short outages (<10 minutes) but it does appear to be a recurring theme for longer outages. Can anything be done about increasing the wait for ACK after an archive data request? Perhaps a bit of intelligence put in - maybe scale the wait to the anticipated download size? Something like this:
which will give the number of anticipated records scaled by some constant.
What do you think?
Code: Select all
2019-07-25 06:33:42.203 Woken
2019-07-25 06:33:42.203 Sending DMPAFT
2019-07-25 06:33:42.404 Wait for ACK
2019-07-25 06:33:42.404 ACK received
2019-07-25 06:33:42.404 Received response to DMPAFT, sending start date and time
2019-07-25 06:33:42.404 Sending: F8-26-AD-08-C4-C2
2019-07-25 06:33:42.604 Wait for ACK
2019-07-25 06:33:42.605 No ACK in response to sending date and time
2019-07-25 06:33:42.605 Get Archive Data
2019-07-25 06:33:42.605 Rollover hour = 9
2019-07-25 06:33:42.605 Last Archive Date: 24/07/2019 22:21:00
2019-07-25 06:33:42.605 Date: 9976
2019-07-25 06:33:42.605 Time: 2221
2019-07-25 06:33:42.605 Waking VP
2019-07-25 06:33:43.006 Woken
2019-07-25 06:33:43.007 Sending DMPAFT
2019-07-25 06:33:43.207 Wait for ACK
2019-07-25 06:33:42.605 Time: 2221
2019-07-25 06:33:42.605 Waking VP
2019-07-25 06:33:43.006 Woken
2019-07-25 06:33:43.007 Sending DMPAFT
2019-07-25 06:33:43.207 Wait for ACK
2019-07-25 06:33:43.207 ACK received
2019-07-25 06:33:43.207 Received response to DMPAFT, sending start date and time
2019-07-25 06:33:43.207 Sending: F8-26-AD-08-C4-C2
2019-07-25 06:33:43.408 Wait for ACK
2019-07-25 06:33:43.408 No ACK in response to sending date and time
2019-07-25 06:33:43.410 Logger archive reading thread completed
2019-07-25 06:33:43.410 Updating highs and lows
2019-07-25 06:33:43.413 Midnight rain reset, count = 219 time = 06:33
2019-07-25 06:33:43.414 Reset sunshine hours, yesterday = 0
2019-07-25 06:33:43.417 Start normal reading loop
Code: Select all
waitTime = ((dateTimeNow - lastArchiveDateTime) / logging interval) * some constant
What do you think?