Joomla 4.0-dev
Correctly configure caching to a redis server. Reload any Joomla page - see it caches and no issues.
Turn off the redis server OR edit /configuration.php and change
public $redis_server_host = 'yourredisserver.com';
to
public $redis_server_host = 'redisDOWN';
reload the /administrator/ url
Joomla handles this failure with grace.
Joomla doesn't display any Notices or Warnings.
Labels |
Added:
?
|
I'm not really sure if there's a way to catch the php warnings that get thrown (it's the same in the session driver too for that part)
Correct. This is a problem way up the stack of Joomla, where the session retrieval is done. For example if the db server is down and sessions are being saved in the db, then again we get PHP warnings and a hard to catch 500 error which is hard to report the REAL reason for the error.
I spent a bit of time on this when looking at the new red screen fatal error handler and could not resolve this.
Ok i think I'm going to close this as a won't fix.
And more in line of technically it's very tricky without underlying redis driver changes to fix this than because I don't want to.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-04-25 22:42:49 |
Closed_By | ⇒ | wilsonge |
If anyone does come up with a solution more than happy to consider it clearly. But without a concrete suggestion hard to see how to take this forward
Basically 2 things.
We need to catch and not display PHP Warnings. I think I have a solution for this but I doubt anyone will like it, but its needed.
We need to sort out the fatal error handler so that we display the correct Exception and not the wrong Exception, based on my experience with implementing the new Symfony Fatal Red Screen of death, the lower end of that handling is simply wrong and needs some love.
By we, I probably mean, Me.
This is not restricted to the Redis Server being unavailable - the same kind of thing happens whenever a PHP Warning is displayed before a Session starts (as well as when the session storage is down) - as evidenced when playing with the FTP Layer recently.
Fix for the undefined variable notice #31121
I'm not really sure if there's a way to catch the php warnings that get thrown (it's the same in the session driver too for that part)