Overview
This article shares the process for resolving the following UBView Dashboard error: Unexpected Error: (12, 'Cannot allocate memory')
Process
Follow these steps to resolve this issue:
- Establish an SSH connection with the management IP of the server.
- Enter the padmincredentials.
- Run su -and enter the root password to get access.
- Type su adminto get access to the CLI console.
- Type show systemidto get the management service tag.
- Type enableand enter the first service tag displayed in step 5, without '*', to enable password.
- Type apache_restartto restart the Apache service on the management server.
- 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
- SSH to the management IP.
- Change to the root user.
- Create a large file (e.g., for 6GB).
 
 dd if=/dev/zero of=/opt/swapfile bs=1M count=6144 
- Change the file access, so that only the root has access.
 
 chmod 0600 /opt/swapfile 
- Format as swap.
 
 mkswap /opt/swapfile 
- Announce to the system.
 
 swapon /opt/swapfile 
- 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
- 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
- 
      Check the swap file available in the system.
 
 swapon -s 
 Filename Type Size Used Priority
 /opt/swapfile file 6291448 0 -1
- Insert the following line in /etc/fstabto enable the swap file after a reboot.
 
 /opt/swapfile none swap sw 0 0 
- Make sure the line was added.
 
 grep swapfile /etc/fstab 
 /opt/swapfile none swap sw 0 0
- 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"
Priyanka Bhotika
Comments