Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
When the DB server goes away, HTTP Status code stays 200 and oC shows exception in browser #36072
Steps to reproduce
This should show a 500 Server Error
Webserver replies with HTTP Status code 200 and the following exception is shown to end users:
ownCloud version: 10.2.1
Web server access log
ownCloud log (data/owncloud.log)
This is what is displayed in the browser:
The whole Stacktrace
The main usage is to report broken installations / states such as the above, when the DB connection is down. The problem is that the ownCloud's logger (and maybe other services such as the request) access to the DB because it needs to fetch the user. This makes ownCloud crash trying to handle the previous exception.
Expected code should be something like:
The challenge is that this "abnormalExceptionHandling" can't rely on ownCloud.
At the moment, there are several unhandled exceptions in apache because we're trying to log when the logger is broken inside the "normal" catch block.
Note that this should be as homogeneous as possible among all the endpoints