![]() |
Use query cached when DB is offline - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Use query cached when DB is offline (/showthread.php?tid=64643) |
Use query cached when DB is offline - StratoKyke - 03-16-2016 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? RE: Use query cached when DB is offline - josepostiga - 03-17-2016 You can try using Query Caching: https://codeigniter.com/user_guide/database/caching.html Or use the db failover... RE: Use query cached when DB is offline - StratoKyke - 03-17-2016 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? RE: Use query cached when DB is offline - josepostiga - 03-17-2016 You should turn db_debug to false, on your database connection configuration. See https://codeigniter.com/user_guide/database/configuration.html RE: Use query cached when DB is offline - StratoKyke - 03-17-2016 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? RE: Use query cached when DB is offline - StratoKyke - 03-21-2016 Someone can help me? |