Page 1 of 1

mysql crashes, can't add innodb settings in my.cnf

Posted: Thu May 14, 2020 12:10 pm
by maha22
hi my mysql always crashes and i can't add some of innodb settings in my my.cnf file, whenever i try to increase pool buffer size mysql won't start when i add this

Code: Select all

 innodb_buffer_pool_size = RAMsizeM
mysql wont srart at all what to do?

my last mysql log is

Code: Select all

200514  6:00:12  InnoDB: Starting crash recovery from checkpoint LSN=144877930
InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
200514  6:00:13  InnoDB: Waiting for the background threads to start
200514  6:00:14 Percona XtraDB (http://www.percona.com) 5.5.61-MariaDB-38.13 started; log sequence number 144877937
200514  6:00:14 [Note] Plugin 'FEEDBACK' is disabled.
200514  6:00:14 [Note] Server socket created on IP: '0.0.0.0'.
200514  6:00:14 [Note] Event Scheduler: Loaded 0 events
200514  6:00:14 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.65-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
200514 06:24:23 mysqld_safe Number of processes running now: 0
200514 06:24:23 mysqld_safe mysqld restarted
200514  6:24:23 [Note] /usr/libexec/mysqld (mysqld 5.5.65-MariaDB) starting as process 32523 ...
200514  6:24:23 [Warning] Changed limits: max_open_files: 1024  max_connections: 214  table_cache: 30
200514  6:24:23 InnoDB: The InnoDB memory heap is disabled
200514  6:24:23 InnoDB: Mutexes and rw_locks use GCC atomic builtins
200514  6:24:23 InnoDB: Compressed tables use zlib 1.2.7
200514  6:24:23 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137756672 bytes) failed; errno 12
200514  6:24:23 InnoDB: Completed initialization of buffer pool
200514  6:24:23 InnoDB: Fatal error: cannot allocate memory for the buffer pool
200514  6:24:23 [ERROR] Plugin 'InnoDB' init function returned error.
200514  6:24:23 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
200514  6:24:23 [ERROR] mysqld: Out of memory (Needed 128917504 bytes)
200514  6:24:23 [ERROR] mysqld: Out of memory (Needed 96681984 bytes)
200514  6:24:23 [Note] Plugin 'FEEDBACK' is disabled.
200514  6:24:23 [ERROR] Unknown/unsupported storage engine: InnoDB
200514  6:24:23 [ERROR] Aborting

200514  6:24:23 [Note] /usr/libexec/mysqld: Shutdown complete

200514 06:24:24 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
my my.cnf config file is

Code: Select all

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0

skip-external-locking
key_buffer_size = 100M
max_allowed_packet = 100M
table_open_cache = 30
sort_buffer_size = 80K
net_buffer_length = 70K
read_buffer_size = 70K
read_rnd_buffer_size = 700K
myisam_sort_buffer_size = 200M


innodb_use_native_aio = 0
innodb_file_per_table = 1


max_connections=1000
max_user_connections=25
wait_timeout=100
interactive_timeout=100
long_query_time=5

#slow_query_log=1
#slow_query_log_file=/var/log/mysql-slow-queries.log



[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

Re: mysql crashes, can't add innodb settings in my.cnf

Posted: Thu May 14, 2020 3:56 pm
by maha22
i figured it out, my problem was , my server ram was decressed for some reason thats why my.cnf wasn't accepting any big ram number. but it does accept small ram, hope this will help someone else