1

I have two servers, one with Windows Small Business Server 2008 and the other runs Windows Server 2012 R2. The servers have running multi master replication. Both uses MariaDB 10.2.6. On the old 2008 everything works fine, even that the database is 32-bits. But on the 2012 I get frequently "Out of memory", the database uses only ~450MB and the system have 6GB free memory when the error shows up. Here is my complete my.ini, I tried already everything:

[client] 
# password       = your_password 
port            = 3306 
socket          = "D:/OCS/MariaDB/mysql.sock"
plugin-dir      = D:/OCS/MariaDB/lib/plugin

# Here follows entries for some specific programs 

# The MySQL server

[mysqld]
tmp_table_size=128M
performance_schema = off
default-storage-engine = myisam
skip-innodb
skip-performance_schema
local-infile
query_cache_type = 1
query_cache_limit = 10M
query_cache_size = 128M
port= 3306
socket = "D:/OCS/MariaDB/mysql.sock"
basedir = "D:/OCS/MariaDB" 
tmpdir = "D:/OCS/MariaDB/tmp" 
datadir = "D:/OCS/MariaDB/data"
pid_file = "mysql.pid"
# enable-named-pipe
key_buffer = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error = "mysql_error.log"
event_scheduler = ON
server_id=1
log-basename=2
log_bin=mysql-bin
max_binlog_size=64M
max_relay_log_size=64M
relay_log_space_limit=64M
auto-increment-increment = 2
auto-increment-offset = 2
slave-skip-errors=1062
# Change here for bind listening
# bind-address="127.0.0.1" 
# bind-address = ::1          # for ipv6

# Where do all the plugins live
plugin_dir = "D:/OCS/MariaDB/lib/plugin/" 

innodb_data_home_dir = "D:/OCS/MariaDB/data"
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = "D:/OCS/MariaDB/data"
#innodb_log_arch_dir = "D:/OCS/MariaDB/data"
## You can set .._buffer_pool_size up to 50 - 80 %
## of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
## Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

## UTF 8 Settings
#init-connect=\'SET NAMES utf8\'
#collation_server=utf8_unicode_ci
#character_set_server=utf8
#skip-character-set-client-handshake
#character_sets-dir="D:/OCS/MariaDB/share/charsets"

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
max_execution_time = 5000
local-infile
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

I am running out of ideas why this happens.. I have tested if the system have some limitations but a small python program allocates over 2GB of RAM with no problems. Both servers are running the same config - on the 2008 the memory usage goes up to 1.5GB with no problems.

0

The 32bit is the culprit. Due to a strange rounding up when calculating buffers, the server would allocate almost twice as much memory (3GB instead of 1.5GB), leaving only 1GB address space for anything else .It is fixed in 10.2.7 and later, the bug report is here https://jira.mariadb.org/browse/MDEV-12097

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.