2015年8月5日 星期三

Restart mysql without stopping service

When system upgrading mysql package, it will stop mysql service. Here is my way to "Hold" user.

Steps:
  1. Check database connection for each request
  2. Check database connection:
    • sleep the process for 10 seconds
    • display a custom 500 page.
  3. The custom 500 page shows "loading..." and will reload the page automatically.

Make a 500 error page which shows "loading" and will reload page in 5 seconds.


Related: Restart php5-fpm without stopping service