SELF CHECKS

When faced with a system down

MySQL

MySQL is down

If there is something wrong with the MySQL you will most likely see this page:

It seems we encountered a problem. Please contact support and provide as much details as possible as to how this occurred. Thanks, and apologies for any inconvenience.

Please first check the mysql status:

service mariadb status

If the service is up and running it is likely there are some corrupted tables due to a power outage. You can see next step how to fix them.

Or you can try to restart the service - after restart mysql will check the state of tables and will try to repair them

service mariadb restart

MySQL condition check

From time to time it's a good habit to check mysql tables condition.

To do that you just need to issue one command:

mysqlcheck -u smestore -p --auto-repair -c -o smestorage

MySQL Out of Disk Space

When using MySQL then a large enough disk is required to accommodate the Database. Also if MySQL replication is configured a disk large enough to accommodate the database and the replication logs is required.

When setting up replication customers can choose an option to purge the logs automatically or they can manually administer and delete the logs.

See the links below for details in how to do this:

https://mariadb.com/kb/en/mariadb/sql-commands-purge-logs/ https://dev.mysql.com/doc/refman/5.7/en/purge-binary-logs.html

MemCached

If your memcached will stop working or it hangs then this manifests itself as users being unable to upload files.

When you'll try to upload something you will get a message:

Can not find uploading process meta data.

This means a record could not be added to memcached and because of that the upload failed.

To solve this as a root issue the following command:

service memcached restart

After that you can also check the service status

service memcached status

You should see something similar to the below:

Active: active (running) since Thu 2016-08-25 13:30:00 BST; 1s ago

PHP-FPM

If you see the message:

Service Unavailable

And the return code is 503. It's a good idea to check first PHP-FPM status, you can do this by issuing this command:

service php-fpm status

You'll see the real status of the service, it may have hung and the status will be active - either way it's a good idea to restart the PHP-FPM service:

service php-fpm restart

APACHE

If your port 80 or 443 is unavailable, check the status of httpd service:

service httpd status

If the service is up and you still can't connect to the NAA Appliance - try to restart the service

service httpd restart

If problem still occurs, you should contact Nasuni Support.