Internal Server Error Alerting and Resolution
What is a HTTP 500 Internal Server Error?
When a webserver returns a 500 status code, it means there is something wrong on the website. So the user requested a proper page, but something on the server makes it unable to fullfill that request. The user has no way to resolve this except wait for it to go away. These errors are the responsibility of the website owner to handle and prevent.
What causes Internal Server Errors?
There are two main causes: human error and unavailable services.
Human error is usually a programming mistake or configuration error. Usually this happens if someone makes a quick fix on the server, without testing it first on a test environment or when a file that isn't supposed to is deployed to your production environment. These are things that should never happen, but still they do and you want to know about it immediately.
- Typing errors in .htaccess files
- Syntax errors in PHP / Python / Ruby / Perl code
- Wrong configuration file (e.g. a development one)
- Unhandled edge cases, e.g. when there is no matching record in the database
The other main cause for HTTP 500 response or Internal Server Errors is an error on a service you depend on. For most websites this is a database server or an external API.
How will Observu help improve uptime?
Observu will help you in two ways:
- It notifies you by E-mail, SMS and/or Phone when your site starts displaying an error
- The server health agent can keep track of your Apache error logs where these errors are logged
Combining these two sources of information will let you know about errors as soon as possible as well as making responding to them a whole lot quicker.
Furthermore, because Observu checks so regularly (up to 7 measurements per minute) you are more likely to catch errors that do not happen every time.