Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

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?

share|improve this answer
    
Thanks for the referral, +1 !!! –  RolandoMySQLDBA Apr 25 '12 at 20:31
    
your welcome...... –  john.locke Apr 26 '12 at 0:46
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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