Expedition uses PHP to perform the backend actions. Some of those require interactions with MariaDB databases and use mysqli as a driver to connect to these databases.
In order to ensure that connections to the database are alive, we want to modify one of the PHP System parameters that allows reconnections to the database once those are lost.
Open a terminal to Expedition and edit the following files:
1. php.ini for Apache
Edit the php.ini file for Apache with the following command
sudo nano /etc/php/7.0/apache2/php.ini
change (you can use the Search feature with ^W)
mysqli.reconnect = Off
to
mysqli.reconnect = On
Write the changes with ^O and exit nano with ^X
2. php.ini for CLI
Edit the php.ini file for Apache with the following command
sudo nano /etc/php/7.0/cli/php.ini
change (you can use the Search feature with ^W)
mysqli.reconnect = Off
to
mysqli.reconnect = On
Write the changes with ^O and exit nano with ^X
3. Apply the changes
Once the changes are done, apply them by
sudo service apache2 restart