List:General Discussion« Previous MessageNext Message »
From:Arun Devaravar Date:April 11 2003 9:50pm
Subject:Temp Table Creation: Got error 12 from table handler
View as plain text  
Hi,
 
MYSQL 3.23.39 on Linux 7.3 is returning an error 12 while creating temporary
tables. Application works fine as long as RAM is available, and fails when
free memory becomes less than 25MB. Temp tables are not bigger than 23 MB.
We are reluctant to use tmp_table_size/big_tables for performance reasons.
 
Errors:
1.	[TCX][MyODBC]Got error 12 from table handler 
*	perror 12 say: Error code  12:  Cannot allocate memory 
2.	[TCX][MyODBC]Out of memory (Needed 400 bytes) 
 
I understand, that, there is not enough memory. The server has 8GB SWAP;
however ZERO size is being used. We have tried all sorts of swap commands
(mkswap, swapon, swapoff) to setup SWAP partitions as well as swap file. It
didn't work.
 
Anyone is using 8GB RAM with 8GB/16GB SWAP?
Any info why MYSQL is not using SWAP? 
Is there limitation on memory usage by MYSQL? 
 
http://www.spack.org/index.cgi/LinuxRamLimits
<http://www.spack.org/index.cgi/LinuxRamLimits> 
 
Above article explains about Kernel limitation to use bigger memory. Is it
true anymore? Is there MYSQL parameter to setup to use bigger memory? 
 
 
 
-------System info----------------------
Server: Quad (8 partitioned) Xeon 2.0GHz, 8GB RAM, 8GB SWAP, 200GB RAID.
Four 2GB separate partitions for swap.
OS: Linux 2.4.18-26.7
Database: MYSQL 3.23.39 Binary install
 
-------top command output -----------------
Mem:  7483272K av, 7023340K used,  459932K free,       0K shrd,   96448K
buff
Swap: 8388544K av,       0K used, 2097136K free                 5443376K
cached
 
Note: Gives error 12 as soon as memory free becomes less than 25MB.
 
 
----------------------Mysql.cnf ------------------
set-variable    = key_buffer=4096M 
set-variable    = max_allowed_packet=1M 
set-variable    = table_cache=1024
set-variable    = max_connections=256 
set-variable    = sort_buffer=400M 
set-variable    = join_buffer=64M 
set-variable    = tmp_table_size=100M 
set-variable    = record_buffer=256M 
set-variable    = myisam_sort_buffer_size=512M 
set-variable    = thread_cache=8 
set-variable    = thread_concurrency=4 
set-variable    = myisam_max_extra_sort_file_size=512M 
set-variable    = myisam_max_sort_file_size=512M 
set-variable    = max_connect_errors=999999999
tmpdir          = /home1/mysql/tmp # 36GB SCSI disk.
--------------end cnf---------------
 
 

Thread
Temp Table Creation: Got error 12 from table handlerArun Devaravar11 Apr
  • Re: Temp Table Creation: Got error 12 from table handlerDan Nelson12 Apr