Troubleshoot [ERROR] mysqld: Out of memory (Needed ###### bytes)
- MySQL tries to allocate more memory than it has available to do so set to the default innodb_buffer_pool_size specification (default value 128MB). When the system runs out of memory, it starts to kill processes to free up RAM.
- Check your mysql log file (/etc/logging/mariadb/mariadb.log or check my.cnf for your logging information)
- my.cnf can be in several locations, from my experience
/etc/mysql/my.cnf
is the usual spot but other locations may include;- /etc/my.cnf
/etc/mysql/my.cnf
/usr/etc/my.cnf
~/.my.cnf
- /etc/my.cnf
- add the following line to the my.cnf file.
innodb_buffer_pool_size= [desired amount 256M / 1G]
- my.cnf can be in several locations, from my experience
- Check your mysql log file (/etc/logging/mariadb/mariadb.log or check my.cnf for your logging information)
- There are other processes on the server that have a heavy allocation of RAM.
- Check using “free -g” , “cat /proc/meminfo” , “top” , “htop”, or ” ps ax” command for performance problems
- Memory leak in MySQL.
After change conduct
sudo service mysqld stop
sudo service mysqld start