what does the log show during the period a)loss of Mysql, b) weewx restart from top, c) reacquire MySQL external db, d) a couple of archive intervals.
how (what order) are the services listed in weewx.conf? On Thursday, 1 June 2017 04:34:01 UTC+3, Louis De Lange wrote: > Tom, > > I tried you recommendation, but it did not quite have the result that I > had in mind. > > Rasing a WeeWxIOError shut down the engine, which retries again and starts > up again if the MySQL server is back online. The problem is that it no > longer updates the local database either. > > If there is an exception to be raised that would restart the connection to > the database without shutting down the engine, it would be my preference. > > > On Wednesday, 31 May 2017 04:44:35 UTC-7, Tom Keffer wrote: >> >> Most likely, the connection to the MySQL server needs to be reestablished >> as well. >> >> When weewx gets a MySQL server error, it restarts from the top, which >> effectively causes the connection to be re-established. If you raise a >> WeeWxIOError (or subclass) instead of ignoring the error, it should do this. >> >> -tk >> >> On Tue, May 30, 2017 at 7:22 PM, Louis De Lange <[email protected]> >> wrote: >> >>> While there seem to be great excitement for the new meteotemplate >>> uploader, I previously wrote a service that updates my meteotemplate >>> database directly without an intermediate php script. In the service i use >>> a ."getSql("INSERT INTO" statement. This works really well and I even >>> resolved the dayrain issue that is now being discussed on another thread. >>> >>> There is one annoying bug and I dont know how to solve it. My >>> meteotemplate install is located on a different server than weewx. It can >>> sometimes happen that the meteotemplate server is temporarily unavailable. >>> To overcome this scenario I use a "try" statement when inserting SQL data, >>> so that it will just skip the upload attempt if the MySQL server is not >>> available. The bug is that the mysql insert command continue to fail after >>> the meteotemplate server becomes available again, and the only way to >>> correct it is to restart weewx. >>> >>> The fail message is "Error (2006, 'MySQL server has gone away')" and it >>> continues to be displayed after the meteotemplate server is back on line. >>> >>> Any ideas how to resolve this will be appreciated. >>> >>> Louis >>> >>> >>> -- >>> 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. >>> >> >> -- 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.
