Aug 6 07:52:22 murali kernel: [10266041.125903] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=redis-server.service,mems_allowed=0,global_oom,task_memcg=/system.slice/mysql.service,task=mysqld,pid=313591,uid=113
Aug 6 07:52:22 murali kernel: [10266041.125983] Out of memory: Killed process 313591 (mysqld) total-vm:1943384kB, anon-rss:923216kB, file-rss:0kB, shmem-rss:0kB, UID:113 pgtables:2340kB oom_score_adj:0
Aug 6 07:52:22 murali systemd[1]: mysql.service: A process of this unit has been killed by the OOM killer.
Aug 6 07:52:22 murali systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
Aug 6 07:52:22 murali systemd[1]: mysql.service: Failed with result ‘oom-kill’.
Aug 6 07:52:22 murali systemd[1]: mysql.service: Consumed 9min 1.030s CPU time.
Aug 6 07:52:22 murali systemd[1]: mysql.service: Scheduled restart job, restart counter is at 216.
Aug 6 07:52:22 murali systemd[1]: Stopped MySQL Community Server.
Aug 6 07:52:22 murali systemd[1]: mysql.service: Consumed 9min 1.030s CPU time.
Aug 6 07:52:22 murali systemd[1]: Starting MySQL Community Server…
Aug 6 07:52:24 murali systemd[1]: Started MySQL Community Server.
Aug 6 08:09:01 murali systemd[1]: Starting Clean php session files…
Aug 6 08:09:01 murali systemd[1]: phpsessionclean.service: Deactivated successfully.
Aug 6 08:09:01 murali systemd[1]: Finished Clean php session files.
check mysql max used connection with time
SHOW STATUS LIKE ‘Max_used_connections’;
mysql> SHOW STATUS LIKE ‘Max_used_connections’;
+———————-+——-+
| Variable_name | Value |
+———————-+——-+
| Max_used_connections | 19 |
+———————-+——-+
warning messages in the error log:
no message in error log.
=====
121112 14:04:36 [Warning] Too many connections
121112 14:04:36 [Warning] Too many connections
121112 14:04:36 [Warning] Too many connections
121112 14:04:36 [Warning] Too many connections
121112 14:04:36 [Warning] Too many connections
121112 14:04:36 [Warning] Too many connections
121112 14:04:36 [Warning] Too many connections
mysql> SHOW STATUS LIKE ‘Threads_connected’;
+——————-+——-+
| Variable_name | Value |
+——————-+——-+
| Threads_connected | 1 |
+——————-+——-+
1 row in set (0.00 sec)
SHOW variables LIKE ‘innodb_redo_log_capacity’;
mysql> SHOW variables LIKE ‘innodb_redo_log_capacity’;
+————————–+———–+
| Variable_name | Value |
+————————–+———–+
| innodb_redo_log_capacity | 104857600 |
+————————–+———–+
1 row in set (0.00 sec)
104mb
increased to 1gb
Default Value | 104857600 |
---|---|
Minimum Value | 8388608 |
Maximum Value | 137438953472 |
2023-08-07T05:23:16.040661Z 0 [Warning] [MY-013865] [InnoDB] Redo log writer is waiting for a new redo log file. Consider increasing innodb_redo_log_capacity.
SET GLOBAL innodb_redo_log_capacity = 1048576000;
mysql> SET GLOBAL innodb_redo_log_capacity = 1048576000;
Query OK, 0 rows affected (0.07 sec)
for permancent add ro my.cnf
innodb_redo_log_capacity = 1024M
innodb_log_file_size and innodb_log_files_in_group are deprecated in MySQL 8.0.30. These variables are superseded by innodb_redo_log_capacity.
Defines the amount of disk space occupied by redo log files.
This variable supersedes the innodb_log_files_in_group
and innodb_log_file_size
variables. When a innodb_redo_log_capacity
setting is defined, the innodb_log_files_in_group
and innodb_log_file_size
settings are ignored; otherwise, these settings are used to compute the innodb_redo_log_capacity
setting (innodb_log_files_in_group
* innodb_log_file_size
= innodb_redo_log_capacity
). If none of those variables are set, redo log capacity is set to the innodb_redo_log_capacity
default value.