J
J
Jopeee2020-10-30 00:14:42
linux
Jopeee, 2020-10-30 00:14:42

How to fix Ubuntu 20.04 slow startup?

I recently installed Ubuntu from a flash drive, the first launch was excellent, the rest of the times it started to turn on with these parameters (+ all this takes a very long time)

This happens when enabled:

5f9b2fa63988a070969763.jpeg
This is the longest stage (5-6min) after the first photo.

5f9b302e79ac8810351102.jpeg
And only after that everything works, how can I fix it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
landergate, 2016-05-17
@Angelxalfa

First of all, make a copy of the database files somewhere now.
Turn off the application connecting to your database.
Try (having a copy of the files) to start MySQL in the innodb_force_recovery mode, so that it still crashes (without checking anything) and you can dump the data. Add the :
section to my.cnf and start MySQL. If it doesn't help, read what the next number does and put it. You can read about each level here: dev.mysql.com/doc/refman/5.7/en/forcing-innodb-rec... Keep in mind that you only need to level up if you have a file copy of the databases, since they can almost certainly damage data.[mysqld]
Just in case, add to the same section:
If MySQL is running, dump all critical tables.
To find out which table stopped the whole process, run mysqlcheck --all-databases. Those tables that write "Corrupted" must be dumped and, after all this rigmarole, redeploy from the dump again.
Do not leave this mode in production.

D
Danil Biryukov-Romanov, 2016-05-17
@urtow

Check the disk space on the VPS, command:
df -h
so check the number of inodes
df -ih
If something is 100% full, you need to clean up the space. If there is no space - most likely some log filled the entire disk, go to /var/log and see which file is the most. If there are no inodes (the second command showed that some partition is 100% full), try cleaning the session files. By default php does not clean them up and they clog up the disk.
This is the most common problem with running Mysql on a VPS.

A
Aleksandr, 2016-05-17
@cyberspy

Apparently, some transaction ended incorrectly ... the fastest solution to the problem is to restore the database from a backup (if there is one, of course)! In addition, the log itself says to turn off logging, and then turn it back on ...
Considering that this is a VPS hosting, I think the hoster will help resolve the situation! Because
there is a hung MySQL process/daemon (impossible to reach the MySQL socket)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question