Page 1 of 1

Datbase Not updating

Posted: Fri Sep 07, 2018 2:18 pm
by BlueBear
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/

Re: Datbase Not updating

Posted: Fri Sep 07, 2018 4:34 pm
by BlueBear
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.

Re: Datbase Not updating

Posted: Fri Sep 07, 2018 11:39 pm
by dmgould
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.

Re: Datbase Not updating

Posted: Sat Sep 08, 2018 10:19 am
by BlueBear
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

Re: Datbase Not updating

Posted: Thu Sep 13, 2018 8:24 am
by Dehatter
I really, REALLY LOVE that fix.

Noted for my future problems!

lol

Tom

Re: Datbase Not updating

Posted: Fri Sep 28, 2018 2:55 pm
by BlueBear
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:

Re: Datbase Not updating

Posted: Fri Sep 28, 2018 4:56 pm
by andyk1
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

Re: Datbase Not updating

Posted: Fri Sep 28, 2018 5:23 pm
by BlueBear
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!

Re: Datbase Not updating

Posted: Sat Sep 29, 2018 12:43 pm
by BlueBear
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

Re: Datbase Not updating

Posted: Sun Sep 30, 2018 1:00 pm
by andyk1
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

Re: Datbase Not updating

Posted: Fri Oct 05, 2018 3:33 pm
by BlueBear
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!

Re: Datbase Not updating

Posted: Sun Oct 07, 2018 3:52 pm
by andyk1
Maybe time to have Jachym Look at this problem. Not sure where to look at next.

Re: Datbase Not updating

Posted: Sun Oct 07, 2018 4:06 pm
by BlueBear
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!

Re: Datbase Not updating

Posted: Sun Oct 07, 2018 4:28 pm
by andyk1
Fingers Crossed.

Re: Datbase Not updating

Posted: Thu Jan 17, 2019 3:45 am
by BlueBear
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.

Re: Datbase Not updating

Posted: Thu Jan 17, 2019 3:50 am
by andyk1
Thanks for letting us know. I never would have guessed this problem or resolution. Again... Thanks.