I have this strange problem in a Win7-4GB machine with MariaDB v. 10.1.18 using only InnoDB tables.
mysqld.exe service memory grows until the OS error out of memory, it take some hours but at the end it happens. I check what it is doing and I have this problem also with 0 active connection, so I’m sure, it doesn’t depend of query complexity or client activity. I also try to restart the service without any clients/applications and it slowly restarts growing.
My mariaDb configuration file my.ini is very short:
[mysqld] datadir=C:/mariadb/data innodb_file_per_table=0
These are some variable about inno memory (got from default configuration):
innodb_buffer_pool_size 134217728 innodb_log_buffer_size 16777216 thread_stack 297984
And this is the InnoDB status output:
===================================== 2018-02-10 17:16:20 0x14e4 INNODB MONITOR OUTPUT ===================================== Per second averages calculated from the last 43 seconds ----------------- BACKGROUND THREAD ----------------- srv_master_thread loops: 0 srv_active, 0 srv_shutdown, 577 srv_idle srv_master_thread log flush and writes: 577 ---------- SEMAPHORES ---------- OS WAIT ARRAY INFO: reservation count 24 OS WAIT ARRAY INFO: signal count 11 RW-shared spins 0, rounds 50, OS waits 18 RW-excl spins 0, rounds 220, OS waits 0 RW-sx spins 0, rounds 0, OS waits 0 Spin rounds per wait: 50.00 RW-shared, 220.00 RW-excl, 0.00 RW-sx ------------ TRANSACTIONS ------------ Trx id counter 45315 Purge done for trx's n:o < 45025 undo n:o < 0 state: running but idle History list length 906 LIST OF TRANSACTIONS FOR EACH SESSION: ---TRANSACTION 281475146910504, not started 0 lock struct(s), heap size 1136, 0 row lock(s) ---TRANSACTION 281475146909576, not started 0 lock struct(s), heap size 1136, 0 row lock(s) -------- FILE I/O -------- I/O thread 0 state: native aio handle (insert buffer thread) I/O thread 1 state: native aio handle (log thread) I/O thread 2 state: native aio handle (read thread) I/O thread 3 state: native aio handle (read thread) I/O thread 4 state: native aio handle (read thread) I/O thread 5 state: native aio handle (read thread) I/O thread 6 state: native aio handle (write thread) I/O thread 7 state: native aio handle (write thread) I/O thread 8 state: native aio handle (write thread) I/O thread 9 state: native aio handle (write thread) Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] , ibuf aio reads:, log i/o's:, sync i/o's: Pending flushes (fsync) log: 0; buffer pool: 0 1089 OS file reads, 52 OS file writes, 7 OS fsyncs 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s ------------------------------------- INSERT BUFFER AND ADAPTIVE HASH INDEX ------------------------------------- Ibuf: size 1, free list len 0, seg size 2, 0 merges merged operations: insert 0, delete mark 0, delete 0 discarded operations: insert 0, delete mark 0, delete 0 Hash table size 34679, node heap has 0 buffer(s) Hash table size 34679, node heap has 0 buffer(s) Hash table size 34679, node heap has 0 buffer(s) Hash table size 34679, node heap has 0 buffer(s) Hash table size 34679, node heap has 0 buffer(s) Hash table size 34679, node heap has 0 buffer(s) Hash table size 34679, node heap has 2 buffer(s) Hash table size 34679, node heap has 0 buffer(s) 0.00 hash searches/s, 0.00 non-hash searches/s --- LOG --- Log sequence number 71707708 Log flushed up to 71707708 Pages flushed up to 71707708 Last checkpoint at 71707699 0 pending log flushes, 0 pending chkp writes 10 log i/o's done, 0.00 log i/o's/second ---------------------- BUFFER POOL AND MEMORY ---------------------- Total large memory allocated 137953280 Dictionary memory allocated 63836 Buffer pool size 8192 Free buffers 7133 Database pages 1057 Old database pages 410 Modified db pages 0 Percent of dirty pages(LRU & free pages): 0.000 Max dirty pages percent: 75.000 Pending reads 0 Pending writes: LRU 0, flush list 0, single page 0 Pages made young 0, not young 0 0.00 youngs/s, 0.00 non-youngs/s Pages read 1023, created 34, written 35 0.00 reads/s, 0.00 creates/s, 0.00 writes/s Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000 Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s LRU len: 1057, unzip_LRU len: 0 I/O sum[0]:cur[0], unzip sum[0]:cur[0] -------------- ROW OPERATIONS -------------- 0 queries inside InnoDB, 0 queries in queue 0 read views open inside InnoDB Process ID=3292, Main thread ID=4936, state: sleeping Number of rows inserted 0, updated 0, deleted 0, read 0 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s Number of system rows inserted 0, updated 0, deleted 0, read 0 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s ---------------------------- END OF INNODB MONITOR OUTPUT ============================
Looking at “Total large memory allocated” seems everything ok. However windows task manager shows mysqld service growing over 3GB. The only particular configuration I set is “innodb_file_per_table=0”.