Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

While restoring a dump file having 4 GB of size Mysql gives Out of memory around after 10 minutes success full restore. Error details are given below.

Configuration: Mysql version : Mysql 5.0.41 32 bit max_allowed_packet = 300M

mysql>source my_dump.sql

Error:

Query OK, 2310 rows affected (0.69 sec)
Records: 2310  Duplicates: 0  Warnings: 0

mysql: Out of memory (Needed 1564047040 bytes)
mysql: Out of memory (Needed 1564047048 bytes)

Solutions will be appreciable.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

This sounds alot like your RAM ran full during the process of restoring the dump. Have you checked with free -m if your RAM and SWAP run full?

If this is the case, one solution could be to either manually split the dump (so each table has it's own file and you can restore them step by step) or you could increase the SWAP space of your machine.

share|improve this answer
add comment

You can temporary increase your swap space by creating a swap file. That won;t require reboot or disk re-partitioning.

Here's how-to

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.