OK - I found the problem and the underlying fault is mine (as usual)!
What was happening is, during the startup phase, the driver was reading the 
'historic' records from the weather station. It reads these in batches and 
then processes therm into the database (and any other places that Weewx 
sends the records - in my case this is WOW, CWOP and the local 
Meteotemplate).
It then goes back to read the next batch of records and repeats until it is 
up to date. It then moves to the normal loop phase.
What was happening is that the time to process each 'batch' of records 
(about 2 minutes as it turned out) was longer than the weather station 
maintained the link - when the driver went back to read the next match it 
got a 'broken pipe' error. However, in trying to get things written in the 
first place, I had inadvertently told Python to let the default error 
handler process this error.... which it did by silently stopping the 
program.
The solution is to process in smaller batches, let Python tell the program 
of the error and then handle it properly.
As far as systemd is concerned, it saw the program stop and restarted it, 
so it was doing exactly what it was supposed to do.
During the initial testing, I was processing the historical records only 
back to the database and so it was occurring fairly quickly. I suspect (but 
have not confirmed) that adding in the connections to the other places - 
especially WOW as I get a number of log entries about retry failures to 
there - has added the extra time and led to the 'broken pipe' timeout.
I've re-written that part of the driver and loaded it back into the Github 
repository.
Susan

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to