2

I am using windows 2003 server, with 8G of RAM and MySQL was installed on It.

I am getting error as follows

out of memory.[ERROR] mysqld: Out of memory (Needed 523712 bytes).

The configuration which i have given are as

max_connections=5000
query_cache_size=16M
table_cache=256
tmp_table_size=103M
thread_cache_size=12
myisam_max_sort_file_size=1M
myisam_sort_buffer_size=205M
key_buffer_size=175M
read_buffer_size=512k
read_rnd_buffer_size=1M
sort_buffer_size=2M
innodb_additional_mem_pool_size=12M
innodb_log_buffer_size=8024K
innodb_buffer_pool_size=1024M
innodb_log_file_size=170M
innodb_thread_concurrency=24

Can any one please tell me the solution.?why this is happening.

0

2 Answers 2

1

The main problem most of the time is buffer_pool_size, key_buffer_size , etc in My.cnf This in depth post from @RolandoMySQLDBA should solve your problem:

Why does MySQL say I'm out of memory?

0
1

Looking at your settings I see a few disturbing trends

You have tmp_table_size=103M and max_connections=5000

That's a maximum of 515000M (103M per connection X 5000) = 503G in tmp tables alone.

Other per-connection settings that are multiplied by 5000 as is explained in How costly is opening and closing of a DB connection?

At the very least, lower the max_connections to 500 for starters

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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