0

I have a LAMP server hosted by Digital Ocean that has been running for more than 3 years. I use the server to run an ERP page where users have to log in to do what they need to do.

Up until recently people could enter the ERP without a problem and do what they needed to do. However, it has been a common occurrence that trying to log in the ERP presents the user with the log in page without any error messages.

I tried looking into it by logging into the server using putty and seeing what the problem was and I was presented with a message saying there wasn't any memory left.

I read online that doing sudo apt-get clean fixes the issue, so I tried that and it did fix it.... for a couple of days until I had to do it again for the same reason. I have been doing this repeatedly for weeks and I want to see if there's a way to avoid that.

What do I need to do for the server to have enough memory? I tried archiving old files and removing them from the server to see if that could help but as far as I can see it only made a small dent.

Can you please help me? Thanks!

Edit, someone asked me to run df -h and df -i on PuTTy. Here are the results:

df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            992M     0  992M   0% /dev
tmpfs           201M   21M  180M  11% /run
/dev/vda1        49G   49G   65M 100% /
tmpfs          1001M     0 1001M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs          1001M     0 1001M   0% /sys/fs/cgroup
/dev/vda15      105M  3.4M  102M   4% /boot/efi
tmpfs           201M     0  201M   0% /run/user/0

df -i
Filesystem      Inodes   IUsed   IFree IUse% Mounted on
udev            253701     378  253323    1% /dev
tmpfs           256014     529  255485    1% /run
/dev/vda1      6451200 1033830 5417370   17% /
tmpfs           256014       1  256013    1% /dev/shm
tmpfs           256014       6  256008    1% /run/lock
tmpfs           256014      16  255998    1% /sys/fs/cgroup
/dev/vda15           0       0       0     - /boot/efi

  • 2
    You should back up and address the memory issue. Whatever you read directing you to run apt-get clean. At best what you're doing is a bandaid on a broken bone. More likely, it's doing nothing. Repeatedly 'fixing' an issue isn't fixing it, you should right-size your application and server accordingly. – yoonix Feb 15 at 21:05
  • @yoonix thank you for your comment. Question: by 'you should right-size your application and server accordingly.' I am assuming you mean 'If you need more memory, upgrade it,' am I correct or did I misunderstood? – Julio Garcia Feb 15 at 21:08
  • Does this help? askubuntu.com/questions/389728/… – Eduardo Trápani Feb 15 at 21:16
  • @EduardoTrápani Thank you for your comment. It does help me, but I need it to work without necessarily having to do an apt-get install. I don't do those often – Julio Garcia Feb 15 at 21:19
  • 1
    Are you sure the error is about the memory? With apt-get clean you remove the repository cache from the host which is using the disk space and not the memory.. What return "df -h" and "df -i" when the issue occur? – DarkVex Feb 15 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.