Start a conversation

Unexpected Error: (12, 'Cannot allocate memory')

Overview

This article shares the process for resolving the following UBView Dashboard error: Unexpected Error: (12, 'Cannot allocate memory')

1.png


 

Process

Follow these steps to resolve this issue:

  1. Establish an SSH connection with the management IP of the server.
  2. Enter the padmin credentials.
  3. Run su - and enter the root password to get access.
  4. Type su admin to get access to the CLI console.
  5. Type show systemid to get the management service tag.
  6. Type enable and enter the first service tag displayed in step 5, without '*', to enable password.
  7. Type apache_restartto restart the Apache service on the management server.
  8. If the error still shows, then create the swap space on the management server by following and restarting the apache service again.

Creating Swap Space

  1. SSH to the management IP.
  2. Change to the root user.
  3. Create a large file (e.g., for 6GB).

    dd if=/dev/zero of=/opt/swapfile bs=1M count=6144

  1. Change the file access, so that only the root has access.

    chmod 0600 /opt/swapfile

  1. Format as swap.

    mkswap /opt/swapfile

  1. Announce to the system.

    swapon /opt/swapfile

  1. Check the swap file has been correctly created.

    ls -al /opt
    total 6297672
    drwxr-xr-x 12 root root 4096 2019-11-26 17:42 .
    drwxr-xr-x 26 root root 4096 2019-11-24 19:23 ..
    drwx------ 2 root root 16384 2014-08-13 14:47 lost+found
    drwxr-xr-x 5 root root 4096 2019-08-19 05:57 lsi
    drwxr-xr-x 3 root root 4096 2019-08-17 16:00 MegaRAID
    drwxr-xr-x 15 root root 4096 2019-08-27 14:28 pang
    drwxr-xr-x 3 root root 4096 2019-08-17 15:56 patches
    -rw-r--r-- 1 root root 6442450944 2019-11-26 17:42 swapfile

  1. Check the memory available in the system which should show the swap added.

    free -m
    total used free shared buffers cached
    Mem: 127871 28521 99349 0 630 8981
    -/+ buffers/cache: 18909 108961
    Swap: 6143 0 6143


  1. Check the swap file available in the system.

    swapon -s
    Filename Type Size Used Priority
    /opt/swapfile file 6291448 0 -1


  1. Insert the following line in /etc/fstab to enable the swap file after a reboot.

    /opt/swapfile none swap sw 0 0

  1. Make sure the line was added.

    grep swapfile /etc/fstab
    /opt/swapfile none swap sw 0 0

     

  1. Restart Apache Service again to follow Process

Note: If the issue still persists, you can add swap space by following the step on the article "Error: 'Cannot allocate memory' After a Memory Upgrade"

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted
  3. Updated

Comments