• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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