Gary,
Restarting the database server process did in fact reproduce the error. It
looks like weewx re-initialises itself to try and recover from the dropped
database connection - and, as you say, that must cause some state mismatch.
I applied your patch and have restarted the server - confirming that I saw
the database disconnection logged - and then the system recovered. I think
that it missed recording the 5 minute reading in question - even though the
database server would have been available to reconnect to immediately.
On Wednesday, 10 June 2020 09:47:13 UTC+1, James Berry wrote:
>
> I will try and reproduce by restarting my database server process. If I
> can reproduce that will then allow me to test your workaround - I have to
> work out how to fill the gaps from wunderground anyway so the time is right
> for experimentation!
>
>
> On Wednesday, 10 June 2020 05:25:58 UTC+1, gjr80 wrote:
>>
>> You may be right. I have followed the log through and I cannot see the
>> casue, it is almost as if the restart after the database error results in
>> an instance of the interceptor driver that is in a confused state. There
>> were some substantial changes to the WeeWX engine code in v4.0, not so much
>> the code itself but a good deal was moved from engine.py to weewxd.
>> Perhaps there is some unusual effect going on. I think this is one for
>> Matthew or Tom.
>>
>> The vibe I get from your posts is that jthis is not a one off occurrence,
>> but it does happen semi-regularly. In that case as a workaround you could
>> make a small patch to the interceptor driver. In
>> usr/share/weewx/user/interceptor.py locate the following lines (circa
>> line 2395):
>>
>> if 'totalrainin' not in data and 'yearlyrainin' in data:
>> self.LABEL_MAP.pop('totalrainin')
>> self.LABEL_MAP['yearlyrainin'] = 'rain_total'
>>
>> and change it to read:
>>
>> if 'totalrainin' not in data and 'yearlyrainin' in data:
>> if 'totalrainin' in self.LABEL_MAP:
>> self.LABEL_MAP.pop('totalrainin')
>> self.LABEL_MAP['yearlyrainin'] = 'rain_total'
>>
>> Save and restart WeeWX. That will prevent the specific error you originally
>> posted but if other oddball issues come up they may well still bring down
>> WeeWX. If it doesn't cause a problem it might be worth continuing to
>> run/monitor the logs with debug = 1 for the time being.
>>
>> Gary
>>
>>
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/55f1e9c5-b4e0-48c6-8222-a4217cdf9f38o%40googlegroups.com.