Datbase Not updating

Post Reply
BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Datbase Not updating

Post by BlueBear » Fri Sep 07, 2018 2:18 pm

I've had some troubles over the past few days starting with a dead battery in the outdoor sensors of my Vantage.
That's all fixed but now the current conditions block is up to date but the database is not, it's over and hour behind!

I've replaced the api.php file from the last update (v17) and can see from the weewx log that it's updating the meteotemplace api link but :cry: :cry:

Any ideas where to look?

Bill
http://www.sanfordweather.com/meteo/

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Datbase Not updating

Post by BlueBear » Fri Sep 07, 2018 4:34 pm

Found something that might give a hint, in the attached file it shows the current date near the top but down at the bottom is shows dates 1969-12-31.
Attachments
apiLog.txt.zip
(1.75 KiB) Downloaded 800 times

User avatar
dmgould
Forecaster
Forecaster
Posts: 173
Joined: Sat Aug 26, 2017 2:43 am
Location: Divide, Colorado, USA
Station model: Davis Pro 2 Plus Wireless
Software: Meteobridge
Contact:

Re: Datbase Not updating

Post by dmgould » Fri Sep 07, 2018 11:39 pm

Just a wild guess. I don't know anything about Weewx. Do your latest database data values match your current values displayed in the current block? If so I'm thinking this may just be a time reporting issue in your console or maybe in your software. Or, maybe a time zone setting issue. I know from experience if the database gets bad time information the date defaults to that 1969-12-31. Check all of your time and time zone settings in all of the hardware, software, and template. Just an idea.
Dave G
Image

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Datbase Not updating

Post by BlueBear » Sat Sep 08, 2018 10:19 am

Thanks for the suggestions but when I woke up this morning everything was working again and I didn't do anything except go to bed 8-) 8-) 8-)

Strange

User avatar
Dehatter
Professional
Professional
Posts: 350
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: Datbase Not updating

Post by Dehatter » Thu Sep 13, 2018 8:24 am

I really, REALLY LOVE that fix.

Noted for my future problems!

lol

Tom
Image

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Datbase Not updating

Post by BlueBear » Fri Sep 28, 2018 2:55 pm

Well it is happening again, current conditions are updating but the database isn't.
Keep getting an error that the date is 1969 but all that gets sent to the template has the correct date ????
Attached is the cron.php log and also the api.log
I've looked at all the date formats and can't see anything wrong!

Maybe if I go have a nap it will correct itself like last time :roll: :roll:
Attachments
cron.php.txt.zip
(553 Bytes) Downloaded 736 times
apiLog.txt.zip
(1.73 KiB) Downloaded 1164 times

andyk1
Professional
Professional
Posts: 433
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: Datbase Not updating

Post by andyk1 » Fri Sep 28, 2018 4:56 pm

Checking your page a few min's ago I see the time is correct but reports Weewx is offline. For the most part... most of your site is working but the picture on the left side of your template is not up to date... early September I think. I also cannot get weewx to work correctly since I am using an Ambient WS-2902 array and extremely complicated to get it setup and have given up for now.

Did you check to see your time zone is correct in all your setting? (I'm guessing that's the first place you looked) the only thing I can think of beside resetting everything.

I think the self correcting part is in your cache file as once it reaches the update interval set in main menu that would fix that part.

Andy
Image

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Datbase Not updating

Post by BlueBear » Fri Sep 28, 2018 5:23 pm

Thanks for the reply Andy, I just rechecked every time setting I could find and all look OK!

All was working until 6AM this morning then it quit! Nothing I did cause I was still asleep!

The out of date picture has been removed, it was the closest I've gotten to getting a picture of a lightning storm!

Hope that Jachym has a few minutes to take a look and point me in the right direction!

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Datbase Not updating

Post by BlueBear » Sat Sep 29, 2018 12:43 pm

Update, as of 2:20 this morning it started working again!!!!

Frustrating, not knowing what is the cause and not being able to correct it

andyk1
Professional
Professional
Posts: 433
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: Datbase Not updating

Post by andyk1 » Sun Sep 30, 2018 1:00 pm

Did you check to see if you have a cache file set anywhere? Also do you have a CDN setup depending on your host?

What is a Content Delivery Network?
A content delivery network (CDN) is a network of servers located in multiple data center/centres around the world. The goal of a CDN is to improve the security and performance of the web content for end-users.

Some hosts offer this but is a bad idea for sites like MT since they cache at a certain interval say 2 hours. Also look at your .htaccess file if you made changes to that
Image

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Datbase Not updating

Post by BlueBear » Fri Oct 05, 2018 3:33 pm

Well for the third time the database has quit updating, current conditions are but the api script seems to think the date is back to 1969. Nothing I've done as it quit again while I was sleeping!
Date strings in meteotemplateLive.txt look right, I've checked all time/date setting in both hardware and software, nuked the cache a couple times, Not aware of any CDN setting with my host.

At a total loss as to where to look, the only good news is that weewx is still running and that database is up to date and thanks to Luc's export script I can back fill the data once everything starts working again!

Bill :? :? :?

Might try to download a fresh copy of V17 and re-install, just in case something is corrupted!

andyk1
Professional
Professional
Posts: 433
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: Datbase Not updating

Post by andyk1 » Sun Oct 07, 2018 3:52 pm

Maybe time to have Jachym Look at this problem. Not sure where to look at next.
Image

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Datbase Not updating

Post by BlueBear » Sun Oct 07, 2018 4:06 pm

Started working again after being down for 20+ hours, again fixed itself while I was asleep!

Downloaded a fresh copy of the template and uploaded the api.php file from that. I had three copies of that file all saying they were v3.1 but with differing file sizes. Fingers crossed that the one that was live was corrupt somehow!

andyk1
Professional
Professional
Posts: 433
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: Datbase Not updating

Post by andyk1 » Sun Oct 07, 2018 4:28 pm

Fingers Crossed.
Image

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Datbase Not updating

Post by BlueBear » Thu Jan 17, 2019 3:45 am

Just an update, turns out my problem was because my hosting package had a limit in traffic hitting the mySQL server. When ever it did I was shut down. For some reason it always happened on a Friday at around the same time!

Upgrade to a different package should solve the issue.

I"m mentioning it just in case someone else encounters something similar.

andyk1
Professional
Professional
Posts: 433
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: Datbase Not updating

Post by andyk1 » Thu Jan 17, 2019 3:50 am

Thanks for letting us know. I never would have guessed this problem or resolution. Again... Thanks.
Image

Post Reply