Fix For Memory Error in Ensim Pro for Linux Version

Restore of appliance, reseller, site and user fails with the “MemoryError” if the size of the backup tar file is greater than the aggregate size of RAM and swap space.

Instructions to fix MemoryError exception occuring during import sites.

Resolution: Add extra swap space to the server before doing the restore. The extra swap space is added to the server by setting up a new swap file and enabling swapping on it.

Instructions to setup swap file:

Select the partition where you want to create the swap file. This partition must have free disk space to create the swap file.

Create a file for swap with the following command (# is shell prompt):

#dd if=/dev/zero of=/var/swapfile bs=1024 count=

Where = number of 1024 blocks required. If count=1024000 size of /var/swapfile will be 1024* 1024000 = 1 GB.

Setup an extra swap with the following command:

#mkswap /var/swapfile

Enable “/var/swapfile” for swapping with the following command:

#swapon /var/swapfile

Verification: The file “/proc/swaps” must contain the entry for the swap file “/var/swapfile”. If this entry is not present, then swapping has not been enabled for the swap area.

Restore can be performed after the extra swap file has been enabled for swapping.

Instructions for deleting the swap file after import:

Turn off swapping for file “/var/swapfile” with the following command:

#swapoff /var/swapfile

Delete the file “/var/swapfile” with the following command:

#rm -f /var/swapfile

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.