Addressed issues with occasional data refreshing failures:
- Optimized PHP code to minimize the frequency of SQL queries.
- Segmented processe to prevent PHP memory overruns and consequent errors.
- Revised the PHP cod to include default values of 0 when fetching data, as the API may not provide measurements for non-existent data.