Sudden issues with 512MB Ubuntu 14.04 WordPress droplet

September 11, 2014 7.7k views

The droplet was created with WordPress on Ubuntu 14.04 image.

I’ve had a WordPress site (with probably zero traffic) running for a while now. Suddenly I noticed it reported a database connection error, fair enough. So I checked:

service mysql status

That returned stop/waiting, fair enough. Easy to get back running. It then crashed again eventually, and so forth.

I read up and noticed comments on creating a swap, which I then did exactly according to this guide.

free -m” shows:

             total       used       free     shared    buffers     cached
Mem:           490        485          4         12          0         20
-/+ buffers/cache:        464         25
Swap:         4095        897       3198

The result of adding swap?
My droplet is sometimes super slow while accessing it via SSH, i.e. typing into it lags. Never had this before, so I assume it is related.
Also, the website doesn’t respond any longer. Ever. Sometimes the browser gets past connecting, but never past waiting.

What went wrong? Which logs should I check?

Surely a WordPress without almost no traffic shouldn’t have issues on even the smallest droplet. I’ve previously had a few sites running on the 512MB perfectly fine.

15 comments
  • After doing nothing, it seems to work now...... ? confusion

  • Why would you want 4GB Swap with a 512MB RAM ??

    I think you should not keep more than 512MB of swap..

    Also in case of wordpress, make sure you are running some cache plug in to reduce the load on system..

  • Thanks for the input.

    I just followed the guide, is there a negative in having a too large swap in relation to RAM?
    I noted the size in the guide of course, just didn’t seem relevant since my site is (and will be) tiny and the droplet has 20GB.

    Currently “df -h” returns 5.9GB used. I’ll probably never hit even 10GB.

    PS. Apparently my site is entirely unresponsive again. What. is. going. on. :(

  • I am not a Linux expert, but what I read about, large swap is not good at max swap should be 2 times the RAM or at MAX not more than 2GB on VPS..

    Everyone seems to say swap of 512MB with 512MB VPS.. If your system needs more than 512MB swap, its better to increase RAM..

    swap is really slow compare to RAM and swap is used as like Page file of Windows where HDD space is used as alternative to RAM in case of system running really low in memory to prevent crash..

  • I’m definitely not a Linux expert, so cheerio for that information! Linux meganovice perhaps.

    Will now look into commands for resizing the swap. :D

  • Show 10 more comments