Fogest / hidefedora-web

The website for reviews and submissions of fedoras for hidefedora project
GNU General Public License v2.0
9 stars 3 forks source link

Backup for json #40

Open hadalin opened 9 years ago

hadalin commented 9 years ago

When the site is down new users can't access the json. Would it be possible to have a backup remote to fetch it?

Fogest commented 9 years ago

This problem had to do with the MySQL database crashing.

I could spin up another hosts that pulls the getJSON.php every so often and caches a version of it. If it goes down it can just keep serving the last cached version it has.

Fogest commented 9 years ago

I have just modified the cache I have right now so it is only updating when something is approved. The problem that caused the getJSON.php file to not work when the database crashed was due to the fact that the cache was gone. It was generating a new one every 5 minutes. The problem being that there was no connection to the database so after 5 minutes the cached file was gone and no cache could be made.

This is now updated, meaning even if MySQL crashes again, the data will still be readable.