Page 1 of 1
Possible database issue: Amount of rain wronged!
Posted: Fri Jan 19, 2018 9:53 pm
by i_fiorentino
Hi Jachym,
i've seen a possible issue on template's database about daily amount of rain.
On both sites (mine and my friend) the amount of rain reported on database (and in station data block) is different respect the same value on weather display reports.
For unknow reason the first line of a day wrote on database(not all day but some day) reports an amount of rain about previous day.
In this way daily rain is added to amount of previous day and total is erroneous.
Please, look the follow screenshots:
1) Weather display report (correct):
2) Meteotemplate rain block:
3) First line of meteotemplate's database (of meteopistoia). The amount of rain in red rectangle (15.4mm) is referred to 1st January not 2 January!!:
This issue caused an incongruence of total rain values.
Have you got an idea about this issue?
Thank you so much for your attention.
Regards,
Alessandro
Re: Possible database issue: Amount of rain wronged!
Posted: Fri Jan 19, 2018 10:13 pm
by Jachym
Hi,
yes it is a common problem, on the Bulk db edit page is a button which will fix it.
To prevent this make sure you have interval of updates which your server can handle. This error occurs when your update time is too short, usually a few seconds and the server is unable to process the update fast enough before another one is triggered at midnight
Re: Possible database issue: Amount of rain wronged!
Posted: Fri Jan 19, 2018 10:57 pm
by i_fiorentino
Jachym wrote: ↑Fri Jan 19, 2018 10:13 pm
Hi,
yes it is a common problem, on the Bulk db edit page is a button which will fix it.
To prevent this make sure you have interval of updates which your server can handle. This error occurs when your update time is too short, usually a few seconds and the server is unable to process the update fast enough before another one is triggered at midnight
Ohh,
i've fix it manually.
I've set 5 seconds of frequency.
What time do you suggest about frequency update?
Re: Possible database issue: Amount of rain wronged!
Posted: Fri Jan 19, 2018 11:44 pm
by Jachym
Hi,
ok I think 99% this is the problem. I only know about 2 or 3 people whose server can handle times like this. I would definitely not go below 10s. Try 10s, if the problem persists (I think it will not) then try 15s. The update usually takes 3-6s, it depends how many people are just on your page and if you have a shared server it can be overloaded by other websites too.
Re: Possible database issue: Amount of rain wronged!
Posted: Sat Jan 20, 2018 9:20 am
by i_fiorentino
Jachym wrote: ↑Fri Jan 19, 2018 11:44 pm
Hi,
ok I think 99% this is the problem. I only know about 2 or 3 people whose server can handle times like this. I would definitely not go below 10s. Try 10s, if the problem persists (I think it will not) then try 15s. The update usually takes 3-6s, it depends how many people are just on your page and if you have a shared server it can be overloaded by other websites too.
Excuse me Jachym,
i don't remember where can i set this parameter.
On Weather dispay menu i've set it to 5 sec but i don't think it's there.
Could you help me?
Thanks.
Regards,
Alessandro
Re: Possible database issue: Amount of rain wronged!
Posted: Sat Jan 20, 2018 9:36 am
by Jachym
Hi,
sorry I cant tell you because this depends on which SW you use or if you have a CRON job. From your post I assume you are using WD, if so, then it is the interval at which WD calls the api.php
Re: Possible database issue: Amount of rain wronged!
Posted: Sat Jan 20, 2018 10:34 am
by i_fiorentino
Jachym wrote: ↑Sat Jan 20, 2018 9:36 am
Hi,
sorry I cant tell you because this depends on which SW you use or if you have a CRON job. From your post I assume you are using WD, if so, then it is the interval at which WD calls the api.php
Ahhh ok.....30 sec because previously value is 5 sec.
Thank you so much.
Regards,
Alessandro
Re: Possible database issue: Amount of rain wronged!
Posted: Sat Jan 20, 2018 9:34 pm
by i_fiorentino
Hi Jachym,
just to inform you that Brian (developer of Weather Display) has inserted another option about Meteotemplate update frequency.....10sec
I've contacted him this morning and he has just done
Regards,
Alessandro
Re: Possible database issue: Amount of rain wronged!
Posted: Sat Jan 20, 2018 9:53 pm
by Jachym
Yes, Brian is very helpful, most helpful of all the devs I worked with.
Re: Possible database issue: Amount of rain wronged!
Posted: Sun Jan 21, 2018 2:23 pm
by i_fiorentino
Today i've had same issue.
No lucky with 10 sec as update frequency.
Question.
How to edit total amount of rain on meteotemplate database?
I've corrected the daily amount of rain on 1.1.2018 (15.4 instead of 15.2)but the amount is the same.
Thanks in advance,
Alessandro
Screenshot about this day....veru strange thing:
This day the bug is on second line, not first!
The amount is wrong (8.0 instead of 6.6):
No lucky after pushed bulk database button:

Re: Possible database issue: Amount of rain wronged!
Posted: Mon Jan 22, 2018 7:38 pm
by i_fiorentino
i_fiorentino wrote: ↑Sun Jan 21, 2018 2:23 pm
Question.
How to edit total amount of rain on meteotemplate database?
I've corrected the daily amount of rain on 1.1.2018 (15.4 instead of 15.2)but the amount is the same.
Thanks in advance,
Please Jachym,
could you answer to this question?
Thank you so much.
Regards,
Alessandro
Re: Possible database issue: Amount of rain wronged!
Posted: Mon Jan 22, 2018 9:04 pm
by Jachym
Hi,
please email me your admin password and the exact date (day) when the problem occurs and also what number you expected to see
Re: Possible database issue: Amount of rain wronged!
Posted: Wed Jan 24, 2018 5:47 pm
by BertSP
Jachym,
I have been reading this thread with interest. In the last couple of weeks, I too, had to correct rogue entries for precipitation. The entries seem to be a carryover from the prior day for lets say 3-5 entries and then go to zero (which would be correct).
I do use 60 sec intervals to load up a script that you created to upload any not previously loaded strings into the DB to accommodate my datalogger. This process is triggered by WD get script which is set at 60 sec intervals but is written to the DB every five minutes. (update/WH.PHP)
Its no biggy as cleaning up the entries is simple enough.
The API upload is only used for current conditions and does not write to DB (I hope). Though this last version of API is slightly different than prior versions and I may have missed commenting-out a line.(#1482 & #1505)
Re: Possible database issue: Amount of rain wronged!
Posted: Wed Jan 24, 2018 7:59 pm
by Jachym
It should not be doing this, not sure why it does this, Ive been trying to fix this with Luc since version 12. Obviously not successfully... I guess what I will do is simply hard-code rain as 0.0 until 0:10 after midnight, because it is a cumulative value it will not affect totals
Re: Possible database issue: Amount of rain wronged!
Posted: Thu Jan 25, 2018 5:46 pm
by i_fiorentino
Meanwhile i don't manage to figure out about total rain amount.
I've tried to edit 1.1.2018 23:55 field with 15.4mm but this data not recordered on meteotemplate db.
Pop-up says data saved but if i re-enter on that field rain value come back to 15.2.
Any idea?
Thanks in advance.
Regards,
Alessandro
Re: Possible database issue: Amount of rain wronged!
Posted: Thu Jan 25, 2018 7:11 pm
by Jachym
Alessandro i replied to you by email yesterday about what to do
Re: Possible database issue: Amount of rain wronged!
Posted: Thu Jan 25, 2018 7:29 pm
by i_fiorentino
Jachym wrote: ↑Thu Jan 25, 2018 7:11 pm
Alessandro i replied to you by email yesterday about what to do
Me too
Anyway, i've fixed my issue editing directly on my database because through meteotemplate control panel all corrections on db weren't recordered.
Regards,
Alessandro
Re: Possible database issue: Amount of rain wronged!
Posted: Fri Feb 02, 2018 7:39 am
by i_fiorentino
Hi Jachym,
i have rain amount issue yet.
This case isn't a database problem because no fix on database bulk procedure.
My site has a discrepancy between rain amount shown on template and rain amount shown on consolle davis around 0.2/0.5mm.
Is there a possibility to find (and fix) this problem?
Thanks in advance.
Regards,
Alessandro
Re: Possible database issue: Amount of rain wronged!
Posted: Fri Feb 02, 2018 9:05 am
by Jachym
Hi,
Meteotemplate never "makes up" numbers, which means that unless it is a zero (which could mean data transfer issue), if you see some number and it is not unit conversion problem (not this case), then the only possibility is that Davis or your software is really sending this, in which case thats where you need to look for the problem