• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Issue swapoff: /pleskswap: swapoff failed: Cannot allocate memory

GermanMazza

New Pleskian
I was trying to disable swap to make it bigger for my server (ubuntu 18.04) but I 've encounter an error and I was unable to find a solution in the forum.
I couldn't make it from step 1:
1- Turn off all swap processes: sudo swapoff -a (error: /pleskswap: swapoff failed: Cannot allocate memory)
2- Resize the swap: sudo dd if=/dev/zero of=/pleskswap bs=1G count=8
3- Make the file usable as swap: sudo mkswap /pleskswap
4- Activate the swap file: sudo swapon /pleskswap
5- Check the amount of swap available: grep SwapTotal /proc/meminfo

Any ideas? maybe kill plesk to edit the swap file?
I'm not an expert on this matter so any advice would be really appreciated
 
swapoff failed: Cannot allocate memory
To disable a swap and not crash the system, you need to save the data from the swap so that the processor can work with them. Thus, there is nowhere else to do this, except in RAM. But you have more data in the swap than free space in the RAM.
So, you must first free up space in the RAM.
 
mmm... This is a very small server with just 1gb of ram, plesk and two websites. How can I free space in the ram?
Maybe disable the services in "tools and settings / sevices management"? or maybe kill plesk process?
 
You can go to Tools&Settings > Apache Web Server Setting and disable unused Apache modules at least.
 
Back
Top