Control Web Panel
WebPanel => MySQL => Topic started by: maxwellins on February 07, 2023, 08:18:16 PM
-
Hello, Why am I getting this warning? Is there a solution?
Account: mysql
Resource: Virtual Memory Size
Exceeded: 3020 > 512 (MB)
Executable: /usr/sbin/mariadbd
Command Line: /usr/sbin/mariadbd
PID: 14921 (Parent PID:14921)
Killed: No
-
Check the available RAM on your server:
free -g
cat /proc/meminfo
Check what applications are using large amounts of RAM: top or htop (see the resident vs virtual memory)
Check mysql configuration: /etc/my.cnf or in the configuration directory: /etc/my.cnf.d.
Run vmstat 5 5
to see if the system is reading/writing via virtual memory and if it is swapping...
Do you have a lot of caching in your my.cnf file?
-
@overseer first of all thank you for answering
(https://i.ibb.co/0tF5Xc5/1.jpg) (https://ibb.co/0tF5Xc5)
(https://i.ibb.co/SJnqPNW/2.jpg) (https://ibb.co/SJnqPNW)
I didn't make any changes to mysql configuration
I've been getting messages like this every day for about a week
Time: Fri Feb 10 04:00:21 2023 +0300
Account: mysql
Resource: Process Time
Exceeded: 190371 > 1800 (seconds)
Executable: /usr/sbin/mariadbd
Command Line: /usr/sbin/mariadbd
PID: 14921 (Parent PID:14921)
Killed: No
-
Definitely consider doing some MySQL performance tuning. There are scripts you can download that check your environment and offer suggestions for changes in you my.cnf file.
MySQL allocates memory in tons of places. Especially look at table cache
Performance_schema
Run this:
show engine performance_schema status
and look at the last line. That may be the cause for the systems with small amount of RAM, i.e. 1G or less
InnoDB
Run this:
show engine innodb status
check the buffer pool section, memory allocated for buffer_pool and related caches)
Temporary tables in RAM
Find all in-memory tables by running
select * from information_schema.tables where engine='MEMORY'
Prepared statements, when it is not deallocated (check the number of prepared commands via deallocate command by running show global status like ‘ Com_prepare_sql';show global status like 'Com_dealloc_sql'
Welcome to the deep end ;)
-
performance_schema.memory : status : 0
Com_dealloc_sql value : 0