10

Each time I start a new environment, after a few weeks of work I get /home/ubuntu/.rvm/gems/ruby-2.7.1/gems/rack-2.2.3/lib/rack/server.rb:433:in `close': No space left on device @ fptr_finalize_flush - /home/ubuntu/environment/corsego/tmp/pids/server.pid (Errno::ENOSPC)

enter image description here So I have to regularly create a new working environment.

My stack that I install : t2.micro (1 GiB RAM + 1 vCPU) , Ubuntu Server 18.04 LTS

How can I just clean up space/unused files?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Yshmarov
  • 3,450
  • 1
  • 22
  • 41

3 Answers3

17

I hope the resizing script commented by @Richard H Boyd solves anyone's problems, but I couldn't configure that script according to my environment parameters.

So I recommend resizing EBS volume manually.

  1. Go to the Cloud9 Environments page.
  2. Select the environment you want to resize and click "View details" button.
  3. EC2 Instance >> Go To Instance
  4. Select the instance and go to the "Storage" tab. And then click the Volume ID.
  5. Select the Volume and click "Actions" button on the top right side. Then select "Modify volume".
  6. Resize the volume as your wish. Then refresh the "Volumes" page.
  7. After you complete modifying process, go to the "Instances" page again and Reboot the instance.
  8. Wait about two minutes and reopen the Cloud9 environment.

After all of these steps, you can use the command below to control:

df -h

This is my output (Because I resized it as 20 GB):

/dev/xvda1       20G  9.5G  9.9G  50% /
Isa Rota
  • 433
  • 4
  • 8
  • The script works well, but this is also a very valid approach. Recently I've been doing it your approach (via the GUI) more often than via the script – Yshmarov Nov 15 '21 at 09:10
  • 1
    Although this helped me in increasing the size but same was not reflecting in filesystem. I followed this to solve the issue https://www.youtube.com/watch?v=eIR_QprrE40 – Manish Jindal Sep 19 '22 at 10:44
8

You can run this script to resize your EBS volume.

Richard H Boyd
  • 201
  • 1
  • 2
1

I had the same issue. To solve this I delete some files/directories that I no longer needed in Cloud9, then I had the space and I was able to save.

Elena
  • 261
  • 1
  • 3
  • 12
  • This just postpones the problem. In the end you will need to increase disc size – Yshmarov May 03 '21 at 22:11
  • Yes you are right. Rebooting the instance is a better solution. – Elena May 05 '21 at 14:51
  • I found an interesting fact. AWS lets you select 10GB volume but they also instal 8.4GB of data / libraries / lambda docker images so you are left with 1.3GB of usable space. – oglop Mar 29 '22 at 10:02
  • Once I've wiped out all files and that and worked. However, accessing IDE once again gives the same memory error. – testing_22 May 03 '22 at 20:31