TurnKey Linux Virtual Appliance Library

TKLBAM restore Error 5: Out of memory

cgeswein's picture

I'm trying hard to restore a database with no success.  I saw several posts that were similar to this but none that addressed this issue specifically.  I've tried to throw more RAM at the problem but it doesn't seem to fix the issue.  Anybody seen this problem and have any suggestions?


ERROR 5 (HY000) at line 4546: Out of memory (Needed 3298256 bytes) 
Traceback (most recent call last): 
File "/usr/bin/tklbam-restore", line 313, in <module> 
File "/usr/bin/tklbam-restore", line 301, in main 
File "/usr/lib/tklbam/restore.py", line 106, in database 
limits=self.limits.db, callback=mysql.cb_print()) 
File "/usr/lib/tklbam/mysql.py", line 402, in restore 
fs2mysql(mysql(), myfs, **kws) 
File "/usr/lib/tklbam/mysql.py", line 365, in fs2mysql 
MyFS_Reader(myfs, limits, skip_extended_insert, add_drop_database).tofile(fh, callback) 
File "/usr/lib/tklbam/mysql.py", line 359, in tofile 
database.tofile(fh, callback) 
File "/usr/lib/tklbam/mysql.py", line 252, in tofile 
File "/usr/lib/tklbam/mysql.py", line 308, in tofile 
fh.write("(%s)" % row) 
IOError: [Errno 32] Broken pipe 

Chris Geswein's picture

TKLBAM gives an error | Bigger than max_allowed_packet

The posting with the same title as the subject of this post is very similar to what I'm experiencing.  I'm going to try and manually extract the mysqldump to see if that will get me working again.

Guest's picture

Was this ever resolved?

Please shere the solution, i'm expiriencing the same issue...

Liraz Siri's picture

The original poster's bug was squashed...

I fixed this bug way back. Are you sure you are experiencing the same issue? Is the traceback exactly the same?
Eli Shalnev's picture


Is it some mysqld tweaking?


Come to the dark side, we have cookies..:)

Liraz Siri's picture

Could you provide more information?

I don't think this is the max_allowed_packet issue because I fixed that back in TKLBAM 1.2:
v1.2 Release Notes

* Restore

  - added embedded squid download cache to make it easier to retry
    failed multi-GB restores without resorting to suicide

  - fixed root cause of the mysql max packet issue by limiting extended
    insert to 1MB chunks
Maybe we should start a new thread where you can describe the problem you are having in more detail? I don't think it's the same problem from 2012.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)