Article ID: 3997, created on Mar 12, 2008, last review on May 10, 2014

  • Applies to:
  • Pro Control Panel Linux 10.3.0


Knowledge ID 2538
Product : Ensim Pro for LinuxVersion : 10.xTopic : Fix For MemoryError
Instructions to fix MemoryError exception occuring during import sites



Version : 10.3.0/10.2.0/10.1.0/10.0.0

Date :  17-Oct-2007

Issue :  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.
Resolution : This Hotfix provides a set of instructions to add extra swap space to the EPL server before doing the restore. The extra swap space is added to the EPL server by setting up a new swap file and enabling swapping on it. The EPL server must have enough disk space to create the swap file. After the restore is successful the swap file can be deleted following the instructions provided to delete the swap file.

Instructions to setup swap file:

  1. Select the partition where you want to create the swap file. This partition must have free disk space to create the swap file.
        (Eg. partition - /dev/hda3 mounted on /, swap file - /var/swapfile).
  2. Create a file for swap with the following command (# is shell prompt):
       #dd if=/dev/zero of=/var/swapfile bs=1024 count=<count>
       where <count>= number of 1024 blocks required. If count=1024000 size of /var/swapfile will be 1024* 1024000 = 1 GB . (Refer to man dd for more information). You can decide the size of "/var/swapfile" depending on the size of the backup tar file.
  3. Setup an extra swap with the following command:
        #mkswap /var/swapfile.
  4. Enable "/var/swapfile" for swapping with the following command:
        #swapon /var/swapfile.
  5. 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.
  6. Restore can be performed after the extra swap file has been enabled for swapping.

Instructions for deleting the swap file after import:

  1. Turn off swapping for file "/var/swapfile" with the following command:
        #swapoff /var/swapfile.
  2. Delete the file "/var/swapfile" with the following command:
        #rm -f /var/swapfile.

3ccb419cf98083f3bb45808fba8dbc7c 4cc899da08664637a8bc437308d3ddd7 3c1bb9f3c3b8305757c406e39a7aa454 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF