apt-upgrade Fails, But the Database is Running
After running apt-upgrade mariadb
, it's possible that apt shows a fail in trying to start the server, but in fact the database is up and running, which then provokes apt to remain in a non finished state.
For example:
This situation could occur if the timeout for the init script was too short. For example, see MDEV-9382, a situation where the timeout was 30 seconds, but the server was taking 48 seconds to start.
To overcome this, the timeout needs to be increased. This can be achieved as follows:
On systems where systemd is not enabled/supported: The timeout can be increased by setting MYSQLD_STARTUP_TIMEOUT either directly in the script or via the command line. In MariaDB 10.1.13 and later versions, the init script also sources /etc/default/mariadb, so it can also be used to set MYSQLD_STARTUP_TIMEOUT to persistently change the startup timeout. The default timeout has been increased from 30s to 60s in MariaDB 10.1.13.
On systems that support systemd: The startup timeout can be increased by setting TimeoutStartSec systemd option.
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?