WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: Bunty on July 11, 2019, 01:37:18 PM

Title: quake-json.php in Earthquake Page Acting Up
Post by: Bunty on July 11, 2019, 01:37:18 PM
You might want to check your earthquake page to see if it is loading.  Recently my earthquake page returned an error that says, "PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /home/public_html/wx/quake-json.php on line 471".  The easy fix is to increase memory to as much as unlimited in cpanel.  But I wonder if it means quake-json needs updated or that the situation is isolated to my side.
Title: Re: quake-json.php in Earthquake Page Acting Up
Post by: saratogaWX on July 11, 2019, 03:55:30 PM
It's likely due to the large JSON file for quakes currently.  Usually 64MB for PHP memory_limit is enough.

My page is showing
Quote
<!-- content length=8721141 -->
<!-- found 11152 earthquake records -->

and my PHP 7.3.7 memory_limit is set to 128M
Title: Re: quake-json.php in Earthquake Page Acting Up
Post by: Bunty on July 12, 2019, 02:33:16 AM
I think you're right.  Frequency of earthquakes and aftershocks have skyrocketed in Oklahoma this week, mostly in the sparsely populated northwest quarter.  But nowhere near as crazy up as California. Fortunately, they have been staying weak with none over 3.1.  They haven't gotten close enough for me to sense.   I had to raise my memory from 64mb to 128mb, php 7.1.