# ERROR 1041 (HY000)  OutOfMemory

**URL:** <https://forums.percona.com/t/error-1041-hy000-outofmemory/965>\
**Category:** Other MySQL® Questions\
**Created:** [October 16, 2008, 5:46am UTC](https://forums.percona.com/t/error-1041-hy000-outofmemory/965 "2008-10-16T05:46:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sterma](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@sterma](https://forums.percona.com/u/sterma)\
**Post date:** [October 16, 2008, 5:46am UTC](https://forums.percona.com/t/error-1041-hy000-outofmemory/965/1 "2008-10-16T05:46:02Z")

</div>

Hi there,

I tried to replay a MySQL Dump back in Database and got this Error:

mysql -u root\_db -p \< /tmp/ccl\_ccr.dumpERROR 1041 (HY000) at line 58: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use ‘ulimit’ to allow mysqld to use more memory or you can add more swap space

So I checked the system behavior:

free -m: total used free shared buffers cachedMem: 16052 11770 4281 0 87 10369-/+ buffers/cache:1313 14738Swap: 32773 0 32773

Looks fine. Here´s the output from ulimit -a:

ulimit -a:core file size (blocks, -c) 0data seg size (kbytes, -d) unlimitedfile size (blocks, -f) unlimitedpending signals (-i) 139264max locked memory (kbytes, -l) 32max memory size (kbytes, -m) unlimitedopen files (-n) 1024pipe size (512 bytes, -p) 8POSIX message queues (bytes, -q) 819200stack size (kbytes, -s) 8192cpu time (seconds, -t) unlimitedmax user processes (-u) 139264virtual memory (kbytes, -v) unlimitedfile locks (-x) unlimited

Here the show status output:

Variable\_name ValueAborted\_clients 563Aborted\_connects 1Binlog\_cache\_disk\_use 0Binlog\_cache\_use 0Bytes\_received 81Bytes\_sent 71Com\_admin\_commands 0Com\_alter\_db 0Com\_alter\_table 0Com\_analyze 0Com\_backup\_table 0Com\_begin 0Com\_change\_db 0Com\_change\_master 0Com\_check 0Com\_checksum 0Com\_commit 0Com\_create\_db 0Com\_create\_function 0Com\_create\_index 0Com\_create\_table 0Com\_dealloc\_sql 0Com\_delete 0Com\_delete\_multi 0Com\_do 0Com\_drop\_db 0Com\_drop\_function 0Com\_drop\_index 0Com\_drop\_table 0Com\_drop\_user 0Com\_execute\_sql 0Com\_flush 0Com\_grant 0Com\_ha\_close 0Com\_ha\_open 0Com\_ha\_read 0Com\_help 0Com\_insert 0Com\_insert\_select 0Com\_kill 0Com\_load 0Com\_load\_master\_data 0Com\_load\_master\_table 0Com\_lock\_tables 0Com\_optimize 0Com\_preload\_keys 0Com\_prepare\_sql 0Com\_purge 0Com\_purge\_before\_date 0Com\_rename\_table 0Com\_repair 0Com\_replace 0Com\_replace\_select 0Com\_reset 0Com\_restore\_table 0Com\_revoke 0Com\_revoke\_all 0Com\_rollback 0Com\_savepoint 0Com\_select 0Com\_set\_option 0Com\_show\_binlog\_events 0Com\_show\_binlogs 0Com\_show\_charsets 0Com\_show\_collations 0Com\_show\_column\_types 0Com\_show\_create\_db 0Com\_show\_create\_table 0Com\_show\_databases 0Com\_show\_errors 0Com\_show\_fields 0Com\_show\_grants 0Com\_show\_innodb\_status 0Com\_show\_keys 0Com\_show\_logs 0Com\_show\_master\_status 0Com\_show\_ndb\_status 0Com\_show\_new\_master 0Com\_show\_open\_tables 0Com\_show\_privileges 0Com\_show\_processlist 0Com\_show\_slave\_hosts 0Com\_show\_slave\_status 0Com\_show\_status 1Com\_show\_storage\_engines 0Com\_show\_tables 0Com\_show\_triggers 0Com\_show\_variables 0Com\_show\_warnings 0Com\_slave\_start 0Com\_slave\_stop 0Com\_stmt\_close 0Com\_stmt\_execute 0Com\_stmt\_fetch 0Com\_stmt\_prepare 0Com\_stmt\_reset 0Com\_stmt\_send\_long\_data 0Com\_truncate 0Com\_unlock\_tables 0Com\_update 0Com\_update\_multi 0Com\_xa\_commit 0Com\_xa\_end 0Com\_xa\_prepare 0Com\_xa\_recover 0Com\_xa\_rollback 0Com\_xa\_start 0Compression OFFConnections 321Created\_tmp\_disk\_tables 0Created\_tmp\_files 2095Created\_tmp\_tables 1Delayed\_errors 0Delayed\_insert\_threads 0Delayed\_writes 0Flush\_commands 1Handler\_commit 0Handler\_delete 0Handler\_discover 0Handler\_prepare 0Handler\_read\_first 0Handler\_read\_key 0Handler\_read\_next 0Handler\_read\_prev 0Handler\_read\_rnd 0Handler\_read\_rnd\_next 0Handler\_rollback 0Handler\_savepoint 0Handler\_savepoint\_rollback 0Handler\_update 0Handler\_write 130Innodb\_buffer\_pool\_pages\_data 3170Innodb\_buffer\_pool\_pages\_dirty 0Innodb\_buffer\_pool\_pages\_flushed 431Innodb\_buffer\_pool\_pages\_free 92760Innodb\_buffer\_pool\_pages\_latched 0Innodb\_buffer\_pool\_pages\_misc 70Innodb\_buffer\_pool\_pages\_total 96000Innodb\_buffer\_pool\_read\_ahead\_rnd 6Innodb\_buffer\_pool\_read\_ahead\_seq 0Innodb\_buffer\_pool\_read\_requests 46477127Innodb\_buffer\_pool\_reads 2866Innodb\_buffer\_pool\_wait\_free 0Innodb\_buffer\_pool\_write\_requests 729Innodb\_data\_fsyncs 718Innodb\_data\_pending\_fsyncs 0Innodb\_data\_pending\_reads 0Innodb\_data\_pending\_writes 0Innodb\_data\_read 54120448Innodb\_data\_reads 2956Innodb\_data\_writes 859Innodb\_data\_written 14304256Innodb\_dblwr\_pages\_written 431Innodb\_dblwr\_writes 143Innodb\_log\_waits 0Innodb\_log\_write\_requests 57Innodb\_log\_writes 154Innodb\_os\_log\_fsyncs 298Innodb\_os\_log\_pending\_fsyncs 0Innodb\_os\_log\_pending\_writes 0Innodb\_os\_log\_written 107520Innodb\_page\_size 16384Innodb\_pages\_created 0Innodb\_pages\_read 3170Innodb\_pages\_written 431Innodb\_row\_lock\_current\_waits 0Innodb\_row\_lock\_time 0Innodb\_row\_lock\_time\_avg 0Innodb\_row\_lock\_time\_max 0Innodb\_row\_lock\_waits 0Innodb\_rows\_deleted 0Innodb\_rows\_inserted 0Innodb\_rows\_read 11105283Innodb\_rows\_updated 139Key\_blocks\_not\_flushed 0Key\_blocks\_unused 1250530Key\_blocks\_used 42906Key\_read\_requests 112825972Key\_reads 42998Key\_write\_requests 26550Key\_writes 24168Last\_query\_cost 0.000000Max\_used\_connections 41Not\_flushed\_delayed\_rows 0Open\_files 105Open\_streams 0Open\_tables 110Opened\_tables 0Qcache\_free\_blocks 117Qcache\_free\_memory 944267424Qcache\_hits 13637Qcache\_inserts 13722Qcache\_lowmem\_prunes 0Qcache\_not\_cached 20090Qcache\_queries\_in\_cache 5681Qcache\_total\_blocks 12025Questions 171225Rpl\_status NULLSelect\_full\_join 0Select\_full\_range\_join 0Select\_range 0Select\_range\_check 0Select\_scan 1Slave\_open\_temp\_tables 0Slave\_retried\_transactions 0Slave\_running OFFSlow\_launch\_threads 0Slow\_queries 0Sort\_merge\_passes 0Sort\_range 0Sort\_rows 0Sort\_scan 0Table\_locks\_immediate 24161Table\_locks\_waited 0Tc\_log\_max\_pages\_used 0Tc\_log\_page\_size 0Tc\_log\_page\_waits 0Threads\_cached 7Threads\_connected 29Threads\_created 128Threads\_running 1Uptime 14456

and the show variables output:

Variable\_name Valueauto\_increment\_increment 1auto\_increment\_offset 1automatic\_sp\_privileges ONback\_log 50basedir /usr/binlog\_cache\_size 32768bulk\_insert\_buffer\_size 8388608character\_set\_client latin1character\_set\_connection latin1character\_set\_database utf8character\_set\_filesystem binarycharacter\_set\_results latin1character\_set\_server utf8character\_set\_system utf8character\_sets\_dir /usr/share/mysql/charsets/collation\_connection latin1\_swedish\_cicollation\_database utf8\_general\_cicollation\_server utf8\_general\_cicompletion\_type 0concurrent\_insert 1connect\_timeout 5datadir /var/lib/mysql\_data/id1/date\_format %Y-%m-%ddatetime\_format %Y-%m-%d %H:%i:%sdefault\_week\_format 0delay\_key\_write ONdelayed\_insert\_limit 100delayed\_insert\_timeout 300delayed\_queue\_size 1000div\_precision\_increment 4engine\_condition\_pushdown OFFexpire\_logs\_days 0flush OFFflush\_time 0ft\_boolean\_syntax + -\>\<()~\*:“”&|ft\_max\_word\_len 84ft\_min\_word\_len 4ft\_query\_expansion\_limit 20ft\_stopword\_file (built-in)group\_concat\_max\_len 1024have\_archive NOhave\_bdb NOhave\_blackhole\_engine NOhave\_compress YEShave\_crypt YEShave\_csv NOhave\_dynamic\_loading NOhave\_example\_engine NOhave\_federated\_engine NOhave\_geometry YEShave\_innodb YEShave\_isam NOhave\_merge\_engine YEShave\_ndbcluster NOhave\_openssl NOhave\_query\_cache YEShave\_raid NOhave\_rtree\_keys YEShave\_symlink YESinit\_connect init\_file init\_slave innodb\_additional\_mem\_pool\_size 33554432innodb\_autoextend\_increment 8innodb\_buffer\_pool\_awe\_mem\_mb 0innodb\_buffer\_pool\_size 1572864000innodb\_checksums ONinnodb\_commit\_concurrency 0innodb\_concurrency\_tickets 500innodb\_data\_file\_path ibdata1:10M:autoextendinnodb\_data\_home\_dir /var/lib/mysql\_data/id1/innodb\_doublewrite ONinnodb\_fast\_shutdown 1innodb\_file\_io\_threads 4innodb\_file\_per\_table ONinnodb\_flush\_log\_at\_trx\_commit 0innodb\_flush\_method innodb\_force\_recovery 0innodb\_lock\_wait\_timeout 50innodb\_locks\_unsafe\_for\_binlog OFFinnodb\_log\_arch\_dir /var/lib/mysql/innodb\_log\_archive OFFinnodb\_log\_buffer\_size 8388608innodb\_log\_file\_size 536870912innodb\_log\_files\_in\_group 2innodb\_log\_group\_home\_dir /var/lib/mysql/innodb\_max\_dirty\_pages\_pct 90innodb\_max\_purge\_lag 0innodb\_mirrored\_log\_groups 1innodb\_open\_files 300innodb\_support\_xa ONinnodb\_sync\_spin\_loops 20innodb\_table\_locks ONinnodb\_thread\_concurrency 8innodb\_thread\_sleep\_delay 10000interactive\_timeout 28800join\_buffer\_size 2093056key\_buffer\_size 1610612736key\_cache\_age\_threshold 300key\_cache\_block\_size 1024key\_cache\_division\_limit 100language /usr/share/mysql/english/large\_files\_support ONlarge\_page\_size 0large\_pages OFFlc\_time\_names en\_USlicense GPLlocal\_infile ONlocked\_in\_memory OFFlog OFFlog\_bin OFFlog\_bin\_trust\_function\_creators OFFlog\_error log\_queries\_not\_using\_indexes ONlog\_slave\_updates OFFlog\_slow\_queries ONlog\_warnings 1long\_query\_time 2low\_priority\_updates ONlower\_case\_file\_system OFFlower\_case\_table\_names 0max\_allowed\_packet 268434432max\_binlog\_cache\_size 18446744073709551615max\_binlog\_size 1073741824max\_connect\_errors 100max\_connections 100max\_delayed\_threads 20max\_error\_count 64max\_heap\_table\_size 2147482624max\_insert\_delayed\_threads 20max\_join\_size 18446744073709551615max\_length\_for\_sort\_data 1024max\_prepared\_stmt\_count 16382max\_relay\_log\_size 0max\_seeks\_for\_key 18446744073709551615max\_sort\_length 1024max\_sp\_recursion\_depth 0max\_tmp\_tables 32max\_user\_connections 100max\_write\_lock\_count 18446744073709551615multi\_range\_count 256myisam\_data\_pointer\_size 6myisam\_max\_sort\_file\_size 9223372036854775807myisam\_recover\_options OFFmyisam\_repair\_threads 1myisam\_sort\_buffer\_size 536870912myisam\_stats\_method nulls\_unequalnet\_buffer\_length 16384net\_read\_timeout 30net\_retry\_count 10net\_write\_timeout 60new OFFold\_passwords OFFopen\_files\_limit 1134optimizer\_prune\_level 1optimizer\_search\_depth 62pid\_file /var/lib/mysql/mysqld.pidport 3306preload\_buffer\_size 32768prepared\_stmt\_count 0protocol\_version 10query\_alloc\_block\_size 8192query\_cache\_limit 4194304query\_cache\_min\_res\_unit 4096query\_cache\_size 1073741824query\_cache\_type ONquery\_cache\_wlock\_invalidate OFFquery\_prealloc\_size 8192range\_alloc\_block\_size 2048read\_buffer\_size 2093056read\_only OFFread\_rnd\_buffer\_size 2093056relay\_log\_purge ONrelay\_log\_space\_limit 0rpl\_recovery\_rank 0secure\_auth OFFserver\_id 1skip\_external\_locking ONskip\_networking OFFskip\_show\_database OFFslave\_compressed\_protocol OFFslave\_load\_tmpdir /var/lib/mysql/.tmp/slave\_net\_timeout 3600slave\_skip\_errors OFFslave\_transaction\_retries 10slow\_launch\_time 2socket /var/lib/mysql/mysql.socksort\_buffer\_size 2097144sql\_big\_selects ONsql\_mode sql\_notes ONsql\_warnings OFFssl\_ca ssl\_capath ssl\_cert ssl\_cipher ssl\_key storage\_engine InnoDBsync\_binlog 0sync\_frm ONsystem\_time\_zone CESTtable\_cache 512table\_lock\_wait\_timeout 50table\_type InnoDBthread\_cache\_size 8thread\_stack 262144time\_format %H:%i:%stime\_zone SYSTEMtimed\_mutexes OFFtmp\_table\_size 268435456tmpdir /var/lib/mysql/.tmp/transaction\_alloc\_block\_size 8192transaction\_prealloc\_size 4096tx\_isolation REPEATABLE-READupdatable\_views\_with\_limit YESversion 5.0.26-logversion\_comment SUSE MySQL RPMversion\_compile\_machine x86\_64version\_compile\_os suse-linuxwait\_timeout 28800

Versions are:

OS: SUSE Linux Enterprise Server 10 (x86\_64)  
MySQL: Ver 14.12 Distrib 5.0.26

So my Questions is, why does this error come up? I cant´t find any setting with reference to this Error. Also very strange: After a reboot of MySQL, everything works fine - until a couple of days…

I would be realy happy if someone could help… I hope, that I gave all informations you need. thanks for reading!

markus

PS: I surfed hours to find a solution but found nothing which helps…

---

<div class="post-metadata">

**Author:** ![sterma](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@sterma](https://forums.percona.com/u/sterma)\
**Post date:** [October 23, 2008, 12:04am UTC](https://forums.percona.com/t/error-1041-hy000-outofmemory/965/2 "2008-10-23T00:04:00Z")

</div>

Hi,

here is a log entry I found in MySQL Error Log:

080924 14:29:03 [ERROR] Got error 12 when reading table ‘./sia\_ccr/contentattribute’

thx, markus

---

<div class="post-metadata">

**Author:** ![debug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/debug/32/772_2.png) [@debug](https://forums.percona.com/u/debug)\
**Post date:** [October 27, 2008, 12:07am UTC](https://forums.percona.com/t/error-1041-hy000-outofmemory/965/3 "2008-10-27T00:07:08Z")

</div>

Are you sure that there is no some limit really? Or probably you are running a kernel which cannot allocate required amount of memory (32bit kernel on server with a lot of RAM)?

---

<div class="post-metadata">

**Author:** ![sterma](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@sterma](https://forums.percona.com/u/sterma)\
**Post date:** [November 4, 2008, 12:46am UTC](https://forums.percona.com/t/error-1041-hy000-outofmemory/965/4 "2008-11-04T00:46:51Z")

</div>

We can´t locate the error. We will upgrade to version 5.1. Maybe it´s a BUG in 5.0.26

---

<div class="post-metadata">

**Author:** ![debug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/debug/32/772_2.png) [@debug](https://forums.percona.com/u/debug)\
**Post date:** [November 4, 2008, 12:49am UTC](https://forums.percona.com/t/error-1041-hy000-outofmemory/965/5 "2008-11-04T00:49:14Z")

</div>

I believe it makes sense to upgrade to latest stable 5.0 release, not to 5.1.
