Import data issue (timeout)
- i_fiorentino
- Language Admin
- Posts: 81
- Joined: Sun Aug 27, 2017 11:31 pm
- Location: Pistoia, Tuscany, IT
- Station model: Davis Vantage Vue
- Software: Weather Display
- Contact:
Import data issue (timeout)
Hi,
i would insert weather data from Weather Display logfiles into meteotemplate db.
Every WD logfiles contains 44640 rows (1*60*24*31).
I've tried to use meteotemplate import data menu but this process ends after only 3 days (4320 rows).
What can i do to import the entire logfiles?
How many minutes use to import all month?
Thank you so much for any help.
Regards,
Alessandro
i would insert weather data from Weather Display logfiles into meteotemplate db.
Every WD logfiles contains 44640 rows (1*60*24*31).
I've tried to use meteotemplate import data menu but this process ends after only 3 days (4320 rows).
What can i do to import the entire logfiles?
How many minutes use to import all month?
Thank you so much for any help.
Regards,
Alessandro
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Import data issue (timeout)
Importing 44K lines should not take too long ( are you saying you are hitting some timeout ).
Post a couple of data files so we can give it a try.
Post a couple of data files so we can give it a try.
- i_fiorentino
- Language Admin
- Posts: 81
- Joined: Sun Aug 27, 2017 11:31 pm
- Location: Pistoia, Tuscany, IT
- Station model: Davis Vantage Vue
- Software: Weather Display
- Contact:
Re: Import data issue (timeout)
Sure,
here it is: https://www.dropbox.com/s/1elazsjuzox14 ... g.txt?dl=0
https://www.dropbox.com/s/7yug2kerfz2a7 ... g.txt?dl=0
Thanks in advance,
Alessandro
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Import data issue (timeout)
I imported correctly both files using following settings:
If this does not work for you we need to understand why the script times out ( or use phpmyadmin for the import process, a conversion of the data is required )
If this does not work for you we need to understand why the script times out ( or use phpmyadmin for the import process, a conversion of the data is required )
- i_fiorentino
- Language Admin
- Posts: 81
- Joined: Sun Aug 27, 2017 11:31 pm
- Location: Pistoia, Tuscany, IT
- Station model: Davis Vantage Vue
- Software: Weather Display
- Contact:
Re: Import data issue (timeout)
Thank you so much for your reply and support.
Strange.
My settings are the same except Field delimiter.
In my case is set to "tab" while your is "space"
With space i've a lot of errors because month values goes empty.
Same stop after three days of imported data
Regards,
Alessandro
Strange.
My settings are the same except Field delimiter.
In my case is set to "tab" while your is "space"
With space i've a lot of errors because month values goes empty.
Same stop after three days of imported data
Regards,
Alessandro
- i_fiorentino
- Language Admin
- Posts: 81
- Joined: Sun Aug 27, 2017 11:31 pm
- Location: Pistoia, Tuscany, IT
- Station model: Davis Vantage Vue
- Software: Weather Display
- Contact:
Re: Import data issue (timeout)
Finally i've imported all files data.
I've three issues now.
1) Wind gust record doesn't imported......i don't know why
2) I've executed reformat.php script but it seems no working....my db remains with 1 minute interval.
3) Live data recordered correctly every 5 minutes but it creates three rows with the same values:
How to fix this bug?
Thanks in advance for any help.
Regards,
Alessandro
I've three issues now.
1) Wind gust record doesn't imported......i don't know why
2) I've executed reformat.php script but it seems no working....my db remains with 1 minute interval.
3) Live data recordered correctly every 5 minutes but it creates three rows with the same values:
How to fix this bug?
Thanks in advance for any help.
Regards,
Alessandro
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Import data issue (timeout)
Hi Alessandro, regarding point 3) you are calling api.php every 10 seconds, I think you should change to 60 seconds.
I think ( not sure about this ) that your api.php takes very long to execute and this results in multiple instances executed in the same time, each saving to the database ( you could check this in phpmyadmin ).
Regarding point 2) I executed the script reformat.php and it works correctly ( but I had only very limited data in db )
The script is quite simple you could try executing in phpmyadmin:
This should result in a new database table called 'new' with a record every 5 minutes
I think ( not sure about this ) that your api.php takes very long to execute and this results in multiple instances executed in the same time, each saving to the database ( you could check this in phpmyadmin ).
Regarding point 2) I executed the script reformat.php and it works correctly ( but I had only very limited data in db )
The script is quite simple you could try executing in phpmyadmin:
Code: Select all
CREATE TABLE new SELECT DateTime, avg(T), max(Tmax), min(Tmin), avg(H), avg(D), avg(W),max(G),B,avg(RR),max(R),avg(P),max(S),avg(A) FROM alldata GROUP BY round(UNIX_TIMESTAMP(DateTime) DIV 300)
- i_fiorentino
- Language Admin
- Posts: 81
- Joined: Sun Aug 27, 2017 11:31 pm
- Location: Pistoia, Tuscany, IT
- Station model: Davis Vantage Vue
- Software: Weather Display
- Contact:
Re: Import data issue (timeout)
Ok,
i've renamed new table in alldata table and i've fixed db issue!
Thank you so much Davide!
Now, i would edit wind gust data because during import data i've lost my alltime record.
I've edited wind gust data row with a new one and save it but i've seen the new data doens't show on my home page.
What's wrong?
Thank you so much.
Regards,
Alessandro
i've renamed new table in alldata table and i've fixed db issue!
Thank you so much Davide!
Now, i would edit wind gust data because during import data i've lost my alltime record.
I've edited wind gust data row with a new one and save it but i've seen the new data doens't show on my home page.
What's wrong?
Thank you so much.
Regards,
Alessandro
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Import data issue (timeout)
I've noticed that too, sometimes the database update does not work ( but it does not return any error )i_fiorentino wrote: ↑Sun Oct 03, 2021 9:43 am Now, i would edit wind gust data because during import data i've lost my alltime record.
I've edited wind gust data row with a new one and save it but i've seen the new data doens't show on my home page.
What's wrong?
Thank you so much.
Regards,
Alessandro
You can always use phpmyadmin to edit a row
- i_fiorentino
- Language Admin
- Posts: 81
- Joined: Sun Aug 27, 2017 11:31 pm
- Location: Pistoia, Tuscany, IT
- Station model: Davis Vantage Vue
- Software: Weather Display
- Contact:
Re: Import data issue (timeout)
Thanks for reply!
Unfortunately i've not "edit" field on every db row.
How have you done?
Ty,
Alessandro
Unfortunately i've not "edit" field on every db row.
How have you done?
Ty,
Alessandro
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Import data issue (timeout)
I think you have to setup these things: ( particularly set DateTime as primary key ) type, null and default columns as shown