No Space Left On Device Error

This post contains affiliate links. If you click through and make a purchase, I may receive a commission (at no additional cost to you). This helps support the blog and allows me to continue to make free content. Thank you for your support!

Nginx is one of the world’s most powerful web servers. It has a robust caching system which eliminates the need for optimizing websites with third-party caching solutions.

Write Error Failed No Space Left On Device

Linux Error: 28: No space left on device: renguzi: Linux - Newbie: 4: 10:32 PM: Stuck at 5.5. Linux-2.6.22.5 API Headers ERROR no space left on device: bucovaina78: Linux From Scratch: 2: 05:26 PM. Kickstart on RHEL 7.3 fails with '/sbin/dmsquash-live-root: line 273: write error: No space left on device' Solution In Progress - Updated 2018-01-24T18:13:28+00:00. At this time your problem should be fixed, now you know how to fix bash: no space left on device on your Linux box. You can also set a cronjob to have your php session files deleted after certain amount of time (days or weeks).

While managing your website, you may come across the strange error called No Space Left on Device while reading upstream.

You won’t know that Nginx is throwing the “No Space Left error” until you check the HTTP response header or go through the log files. To see the response header, install the Redirect Path Chrome extension or use the online redirect checker tool.

No Space Left On Device Error

The problem occurs when Nginx is unable to store the cache file to the hard disk. The error clearly indicates that the hard disk partition has no room for new files.

Space

The site will continue to work as usual but Nginx won’t serve non-cached webpages quickly.

No space left on device error in denodo

No Space Left On Device Error Failed

How to fix the error?

First, identify which partition doesn’t have free space. You can do so by typing the following command in the terminal:

df -h

You’ll now see the following details on the screen:

  • File system.
  • Size.
  • Used.
  • Available.
  • Used.
  • Mounted on.
No Space Left On Device Error

Go through the partition details and check whether any partition’s disk space usage has reached up to 100%.

Once you find the partition, open it and delete useless files so as to free up the disk space and fix the problem.

In case the partition is mounted on the system memory (indicated by the TMPFS directory), run the below command to unmount it.

Umount path_to_the_directory.

Now, restart Nginx. The error will now disappear from the file.

To prevent the no space left on device error in future, edit the Nginx configuration file (or your website‘s config file) and increase the value of the key zone.

Users face the problem because they configure the OS to serve cache files from RAM. Although this can boost the performance of your site quickly, it reduces the amount of RAM available for other applications running on the server and leads to out of memory error.

If your server uses SSD instead of HDD, you don’t have to mount the partition into the system memory.

Image Credits: Photo by Frederic Köberl on Unsplash.

Comments are closed.