Magento – Magento site shows error SQLSTATE[HY000]: General error: 5 Out of memory

ce-1.7.0.2databaseerrorMySQLmysql-config

One of our store show following error and stop working at all.

SQLSTATE[HY000]: General error: 5 Out of memory

and Mysql / Innodb Error

InnoDB: ERROR: the age of the last checkpoint is 943460

[ERROR] /usr/sbin/mysqld: Out of memory (Needed 27262948 bytes)

Why Magento showing goes down and show this error?

More details (if needed):

At that time error occur online user were 150.

My.ini settings related to innodb are

innodb_file_per_table=1
query_cache_limit =500M
query_cache_size = 96M
innodb_buffer_pool_size = 2048M
key_buffer = 512M 
max_allowed_packet = 64M
table_cache = 1024
sort_buffer_size = 4M
read_buffer_size = 4M
query_cache_type = 1
max_connections=500
wait_timeout=120
innodb_additional_mem_pool_size = 20M
set-variable = max_connections=500

Server:

CPU: inter quad core 
memory: 4GB
disk: 100GB

OS centOS 6.3
Apache 2.0
PHP 5.3
Mysql 5.0

PS.

As per error ie. trying insert too much data into InnoDB too quickly.

log_visitor_info, log_url_info and log_url are much overwritten.

What if I will change log_visitor_info, log_url_info and log_url storage engine to myISAM will it solve this problem?

is it ok changing of storage engine of these tables?

Thanks in advance…

Best Answer

This is a sql buffer size issue.

Review your query, increase buffers in my.ini. Also make sure to repair all your tables and re-index them.

See: http://dev.mysql.com/doc/refman/5.0/en/error-messages-server.html