Finally, I am using the below setting file to avoid "
Error: MySQL server has gone away" message.
I have not been getting the message for 3 days (as an aging test).
Here is the related configuration files that have to be modified for Ubuntu 16.04.1 & Mariadb Server 10.0.
mytizen$sudo vi /etc/mysql/conf.d/mysqldump.cnf
mytizen$sudo vi /etc/mysql/mariadb.conf.d/50-server.cnf
mytizen$sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
----------- content -------------------------------------
# * Fine Tuning
# max_allowed_packet: from 16M to 128M
max_allowed_packet = 128M
# timeout: from 28800 (8h) to 2592000 (30days)
wait_timeout = 2592000
interactive_timeout = 2592000
-----------------------------------------------------------
The below is how we check the values if the modified valued is applied to Mariadb server.
MariaDB [(none)]>
MariaDB [(none)]> SELECT @@global.wait_timeout, @@global.interactive_timeout, @@session.wait_timeout, @@session.interactive_timeout;
+-----------------------+------------------------------+------------------------+-------------------------------+
| @@global.wait_timeout | @@global.interactive_timeout | @@session.wait_timeout | @@session.interactive_timeout |
+-----------------------+------------------------------+------------------------+-------------------------------+
| 2592000 | 2592000 | 2592000 | 2592000 |
+-----------------------+------------------------------+------------------------+-------------------------------+
1 row in set (0.00 sec)
MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]> show variables like 'max_allowed_packet';
+--------------------+-----------+
| Variable_name | Value |
+--------------------+-----------+
| max_allowed_packet | 134217728 |
+--------------------+-----------+
1 row in set (0.00 sec)
MariaDB [(none)]>