Post #151824
August 31, 2020, 07:35:43 AM
Earlier tonight, I noticed that the front page was loading very slowly. I was able to trace it to the MC server and the API we use to get data about the server. The API was down, and the page was waiting for the API time time out before it would finish loading, which could take up to 30 seconds. I made some minor changes to rectify this issue:
-The connection to the API can now last no longer than a second. If the API hasn't returned the data in that time, the script will assume that it's down.
-If the API didn't return an update time (such as when it's down), the front page would attempt to query the API on every load instead of once every three minutes as it should. This has been fixed by substituting the current server time in case the API doesn't return an update time.
-On the development skin, a message will display in the Minecraft status page when the API is down stating that the server information is unavailable. When the API is down, only the server address will be shown (as the server is completely separate and will remain up). This will be carried over to the production skin when the current dev skin projects are finalized.
You can read more about them here.