Welcome Guest, Not a member yet? Register   Sign In
Use query cached when DB is offline
#1

(This post was last modified: 03-16-2016, 12:19 PM by StratoKyke.)

I have a system with multiple database, and happen that one of the db is offline. When one db is offline the site return the error and the site not working. How can I do so that they are the cache files query displayed and no errors snack of any kind? Still leaving the website online?
Reply
#2

You can try using Query Caching: https://codeigniter.com/user_guide/datab...ching.html

Or use the db failover...
Best regards,
José Postiga
Senior Backend Developer
Reply
#3

Already I use Query caching. But how can I do so that when one of the db is offline are not shown any errors that block the use of the site? But the query cache are displayed instead?
Reply
#4

You should turn db_debug to false, on your database connection configuration. See https://codeigniter.com/user_guide/datab...ation.html
Best regards,
José Postiga
Senior Backend Developer
Reply
#5

The site also displays this error: mysqli::real_connect(): (HY000/2002): No such file or directory
I can turn them all errors off, but still the site where one of the db is offline displays a blank page.
there is not a way to make the site even with an offline db, show the query cache?
Reply
#6

Someone can help me?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB