This is not an answer to your question, but, if you have root access to the
database on the remote server, you can create one local to weewx and set up
replication, with the weewx machine db the master and the remote one the
slave.
Then you would just update the local one. The remote db will automatically
keep itself up to date. If it is offline for a while, it will catch up
when it gets back.
On Tuesday, May 30, 2017 at 10:22:16 PM UTC-4, Louis De Lange 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.