2 leaks
source | link

There is no good formula for the 'max' memory MySQL will use. Some settings are not only per-connection, but per-subquery-per-connection.

free -m implies that there is a lot of RAM in use. But the settings for MySQL do not account for it all. Do you have other applications running? How much space are they consuming?

Baring the puzzling value of free -m, I would suggest these changes:

innodb_buffer_pool_size = 5G
innodb_buffer_pool_instances = 5
key_buffer_size = 20M  -- assuming you are not using MyISAM
max_connections = 100
tmp_table_size = 64M
max_heap_table_size = 64M
table_open_cache = 2000
table_definition_cache = 1500

But, the real fix may be to re-think the need for 3000 tables.

After you have been running for at least a day (with or without those changes), provide SHOW GLOBAL STATUS; and SHOW VARIABLES;. We can get further details from them.

Some recent changes

----- 2019-02-11 MariaDB 10.2.22 & 2019-01-29 MariaDB 10.4.2 -- -- -----

Fix a memory leak in ALTER TABLE

----- 2019-02-11 MariaDB 10.2.22 & 2019-01-29 MariaDB 10.4.2 -- -- -----

MDEV-15114 : Fix memory leaks

----- 2019-02-06 MariaDB 10.1.38 -- -- -----

Silence LeakSanitizer by default in mariabackup, so that phanthom "leaks" would not hide more interesting information, like invalid memory accesses.

----- 2019-01-02 MariaDB 10.2.21 -- -- -----

Silence LeakSanitizer by default in mariabackup, so that phanthom "leaks" would not hide more interesting information, like invalid memory accesses. Merge Revision #33caaba5c8 2018-12-28 17:40:38 +0200 - Merge 10.1 into 10.2

----- 2018-11-01 MariaDB 10.0.37 & 2018-09-07 MariaDB 10.1.36 & 2018-08-07 MariaDB 10.1.35 & 2018-08-01 MariaDB 10.0.36 -- -- -----

MDEV-16757 Memory leak after adding manually min/max statistical data for blob column

There is no good formula for the 'max' memory MySQL will use. Some settings are not only per-connection, but per-subquery-per-connection.

free -m implies that there is a lot of RAM in use. But the settings for MySQL do not account for it all. Do you have other applications running? How much space are they consuming?

Baring the puzzling value of free -m, I would suggest these changes:

innodb_buffer_pool_size = 5G
innodb_buffer_pool_instances = 5
key_buffer_size = 20M  -- assuming you are not using MyISAM
max_connections = 100
tmp_table_size = 64M
max_heap_table_size = 64M
table_open_cache = 2000
table_definition_cache = 1500

But, the real fix may be to re-think the need for 3000 tables.

After you have been running for at least a day (with or without those changes), provide SHOW GLOBAL STATUS; and SHOW VARIABLES;. We can get further details from them.

There is no good formula for the 'max' memory MySQL will use. Some settings are not only per-connection, but per-subquery-per-connection.

free -m implies that there is a lot of RAM in use. But the settings for MySQL do not account for it all. Do you have other applications running? How much space are they consuming?

Baring the puzzling value of free -m, I would suggest these changes:

innodb_buffer_pool_size = 5G
innodb_buffer_pool_instances = 5
key_buffer_size = 20M  -- assuming you are not using MyISAM
max_connections = 100
tmp_table_size = 64M
max_heap_table_size = 64M
table_open_cache = 2000
table_definition_cache = 1500

But, the real fix may be to re-think the need for 3000 tables.

After you have been running for at least a day (with or without those changes), provide SHOW GLOBAL STATUS; and SHOW VARIABLES;. We can get further details from them.

Some recent changes

----- 2019-02-11 MariaDB 10.2.22 & 2019-01-29 MariaDB 10.4.2 -- -- -----

Fix a memory leak in ALTER TABLE

----- 2019-02-11 MariaDB 10.2.22 & 2019-01-29 MariaDB 10.4.2 -- -- -----

MDEV-15114 : Fix memory leaks

----- 2019-02-06 MariaDB 10.1.38 -- -- -----

Silence LeakSanitizer by default in mariabackup, so that phanthom "leaks" would not hide more interesting information, like invalid memory accesses.

----- 2019-01-02 MariaDB 10.2.21 -- -- -----

Silence LeakSanitizer by default in mariabackup, so that phanthom "leaks" would not hide more interesting information, like invalid memory accesses. Merge Revision #33caaba5c8 2018-12-28 17:40:38 +0200 - Merge 10.1 into 10.2

----- 2018-11-01 MariaDB 10.0.37 & 2018-09-07 MariaDB 10.1.36 & 2018-08-07 MariaDB 10.1.35 & 2018-08-01 MariaDB 10.0.36 -- -- -----

MDEV-16757 Memory leak after adding manually min/max statistical data for blob column

1
source | link

There is no good formula for the 'max' memory MySQL will use. Some settings are not only per-connection, but per-subquery-per-connection.

free -m implies that there is a lot of RAM in use. But the settings for MySQL do not account for it all. Do you have other applications running? How much space are they consuming?

Baring the puzzling value of free -m, I would suggest these changes:

innodb_buffer_pool_size = 5G
innodb_buffer_pool_instances = 5
key_buffer_size = 20M  -- assuming you are not using MyISAM
max_connections = 100
tmp_table_size = 64M
max_heap_table_size = 64M
table_open_cache = 2000
table_definition_cache = 1500

But, the real fix may be to re-think the need for 3000 tables.

After you have been running for at least a day (with or without those changes), provide SHOW GLOBAL STATUS; and SHOW VARIABLES;. We can get further details from them.