Home>

RU : Hello everyone. Prompt where to dig? There EC2 Instance, flying a LAMP Stack

Mysql, on the expiration of 3-4 days after the next reboot, the message starts to eat the CPU to 100% DB is very small, less than a megabyte. Where to look?

mysql Ver 14.14 Distrib 5.7.35, for Linux (x86_64) using EditLine wrapper

Screen to reboot later. Thanks!!

ENG : I create AWS EC2 instance, t2.medium, install LAMP Stack. Then, succesfuly restore mysql.dump, configure apache2 + php.

And 3-4 days after creating instance, mysql process use 100% of my CPU. Can you help me please? If i reboot EC2, everything start normal and CPU load is minimal

mysql Ver 14.14 Distrib 5.7.35, for Linux (x86_64) using EditLine wrapper

BEFORE reboot

UPD: error.log

2021-08-25T08: 28: 47.051298Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2021-08-25T08: 28: 47.054673Z 0 [Warning] CA certificate ca.pem is self signed.
2021-08-25T08: 28: 47.054719Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2021-08-25T08: 28: 47.056009Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2021-08-25T08: 28: 47.056026Z 0 [Note] -'127.0.0.1' resolves to '127.0.0.1';
2021-08-25T08: 28: 47.056137Z 0 [Note] Server socket created on IP: '127.0.0.1'.
2021-08-25T08: 28: 47.077015Z 0 [Note] InnoDB: Buffer pool (s) load completed at 8:28:47 210825
2021-08-25T08: 28: 47.144311Z 0 [Note] Event Scheduler: Loaded 0 events
2021-08-25T08: 28: 47.144515Z 0 [Note] /usr /sbin /mysqld: ready for connections.
Version: '5.7.35' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)

Hi. Sori, made in Russian. You do not tell me how to find the logs of requests?

Yuriy2021-08-25 09:35:30

See where so many threads like they are busy and why not close if they are idle.

Akina2021-08-25 09:36:30
  • Answer # 1

    The problem was solved.

    The error was that there were about 50 pieces of requests in the database:

    Select sys_scheduler. *, Max (sys_scheduler_log.created) AS Created FROM
    SYS_SCHEDULER LEFT OUTER JOI
    

    and all in the Sending Data state. All this hung for the reason that the wrong rights were issued to the necessary scripts inside the root of the site. At first, I gave the right, then, inside MySQL made

    Delete from sys_scheduler_log
    

    But my case is unique, because if someone has the same, check the scripts and rights to them

  • Answer # 2

    The problem was solved.

    The error was that there were about 50 pieces of requests in the database:

    Select sys_scheduler. *, Max (sys_scheduler_log.created) AS Created FROM
    SYS_SCHEDULER LEFT OUTER JOI
    

    and all in the Sending Data state. All this hung for the reason that the wrong rights were issued to the necessary scripts inside the root of the site. At first, I gave the right, then, inside MySQL made

    Delete from sys_scheduler_log
    

    But my case is unique, because if someone has the same, check the scripts and rights to them