Answers.Body: <p>There's no plugin for that... it wouldn't quite make sense. If the site went down, the plugin would be down too.</p>
  
  <p>Your best bet is to find a 3rd party service to monitor the site's uptime. There are several services which will alert (via text or email) if your site becomes unavailable. Here are a few examples...</p>
  
  <ul>
  <li><a href="https://uptimerobot.com/" rel="nofollow">Uptime Robot</a></li>
  <li><a href="https://newrelic.com/" rel="nofollow">New Relic</a></li>
  <li><a href="https://www.pingdom.com/" rel="nofollow">Pingdom</a></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-13T02:44:39.847Z
Answers.Text: Ahh, that makes sense :) Uptime robot monitoring is already installed for that site and I haven't reveived an alert. Maybe server is not serving 500 code? I haven't tested it, because of putting off fire.
Answers.UserDisplayName: Tibor Szasz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-13T03:09:21.670Z
Answers.Text: FWIW [Constellix Sonar](http://constellix.com/sonar/sonarchecks/) can also be useful because it'll capture traceroutes from its nodes that report issues. Also free for some undefined amount of time.
Answers.UserDisplayName: Matt Stein
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-13T03:24:43.757Z
Answers.Text: Thanks, I already use some similar solution on another project.
  
  Is there an onError hook for craft? If it can display a nice maintenance page, I'm sure it can send and error report before :)
Answers.UserDisplayName: Tibor Szasz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-13T19:07:48.987Z
Answers.Text: @TiborSzasz No `onError` hook. Craft has some internal logic to serve `{errorCode}.html` templates for internal exceptions, but if your database burns down and someone hacks into your server and uninstalls Apache obviously that stuff goes out the window. Like Lindsey says, use a third party service to monitor uptime, and possibly a third party service like [Rollbar](https://github.com/boboldehampsink/rollbar) to monitor exceptions.
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-13T19:48:37.593Z
Answers.Text: Sure, but it would be handy. Uptime Robot didn't catch the 503 error that goes with faulty DB connection. I should check out other services.
Answers.UserDisplayName: Tibor Szasz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-13T19:49:27.173Z
Answers.Text: @MatsMikkelRummelhoff if you post the no hook as answer I accept it.
Answers.UserDisplayName: Tibor Szasz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-14T02:00:08.927Z
Answers.Text: @MatsMikkelRummelhoff Craft doesn't explicitly define an onError event because Yii already provides one (http://www.yiiframework.com/doc/api/1.1/CApplication#onError-detail) as well as onException (http://www.yiiframework.com/doc/api/1.1/CApplication#onException-detail)
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-14T05:53:32.420Z
Answers.Text: Thats good to know, @BradBell - wasnt aware of that.
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-13T02:18:30.503Z
Answers.LastActivityDate: 2016-08-13T02:18:30.503Z
Answers.UserDisplayName: Lindsey D
Body: <p>I have a Craft installation on DigitalOcean, with the smallest package:</p>
  
  <pre><code>512MB Memory
  1 Core Processor
  20GB SSD Disk
  1TB Transfer
  </code></pre>
  
  <p>I installed the default LAMP droplet.</p>
  
  <p>PROBLEM:
  MySQL crashes from time to time. There were no significant server load either.</p>
  
  <p>What might be a root cause? </p>
  
  <p><strong>Bonus question:</strong></p>
  
  <p>Is there a plugin that automatically reports when the site is down?</p>
  
  <p><a href="https://i.sstatic.net/RzXjx.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/RzXjx.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-13T10:39:17.210Z
Comments.Text: Question is still open, when Craft crashes gracefully, I would assume it to fire a hook event. Note that crash can mean a faulty MySQL connection too, but for the visitors it doesn't matter.
Comments.UserDisplayName: Tibor Szasz
Tags: <server>
Title: Plugin to report when site becomes unavailable
ThreadText: # Plugin to report when site becomes unavailable
  
  (Asked by: username_0 on 2016-08-13)
  
  I have a Craft installation on DigitalOcean, with the smallest package:
  
  ```
  512MB Memory
  1 Core Processor
  20GB SSD Disk
  1TB Transfer
  
  ```
  
  I installed the default LAMP droplet.
  
  PROBLEM:
  MySQL crashes from time to time. There were no significant server load either.
  
  What might be a root cause?
  
  **Bonus question:**
  
  Is there a plugin that automatically reports when the site is down?
  
  [![enter image description here](https://i.sstatic.net/RzXjx.png)](https://i.sstatic.net/RzXjx.png)
  
  **Tags:** server
  
  > **Comments:**
  > **username_0**: Question is still open, when Craft crashes gracefully, I would assume it to fire a hook event. Note that crash can mean a faulty MySQL connection too, but for the visitors it doesn't matter.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-08-13. Score: 3
  
  There's no plugin for that... it wouldn't quite make sense. If the site went down, the plugin would be down too.
  
  Your best bet is to find a 3rd party service to monitor the site's uptime. There are several services which will alert (via text or email) if your site becomes unavailable. Here are a few examples...
  
  * [Uptime Robot](https://uptimerobot.com/)
  * [New Relic](https://newrelic.com/)
  * [Pingdom](https://www.pingdom.com/)
  
  > **Comments:**
  > **username_0**: Ahh, that makes sense :) Uptime robot monitoring is already installed for that site and I haven't reveived an alert. Maybe server is not serving 500 code? I haven't tested it, because of putting off fire.  
  > **username_2**: FWIW [Constellix Sonar](http://constellix.com/sonar/sonarchecks/) can also be useful because it'll capture traceroutes from its nodes that report issues. Also free for some undefined amount of time.  
  > **username_0**: Thanks, I already use some similar solution on another project.  Is there an onError hook for craft? If it can display a nice maintenance page, I'm sure it can send and error report before :)  
  > **username_3**: @username_0 No `onError` hook. Craft has some internal logic to serve `{errorCode}.html` templates for internal exceptions, but if your database burns down and someone hacks into your server and uninstalls Apache obviously that stuff goes out the window. Like username_1 says, use a third party service to monitor uptime, and possibly a third party service like [Rollbar](https://github.com/boboldehampsink/rollbar) to monitor exceptions.  
  > **username_0**: Sure, but it would be handy. Uptime Robot didn't catch the 503 error that goes with faulty DB connection. I should check out other services.  
  > **username_0**: @username_3 if you post the no hook as answer I accept it.  
  > **username_4**: @username_3 Craft doesn't explicitly define an onError event because Yii already provides one (http://www.yiiframework.com/doc/api/1.1/CApplication#onError-detail) as well as onException (http://www.yiiframework.com/doc/api/1.1/CApplication#onException-detail)  
  > **username_3**: Thats good to know, @username_4 - wasnt aware of that.  
  
  ---
  
  