Ubuntu: Unable to create file /tmp/testfile: No space left on device


i have really strange situation today over one of my Ubuntu Server. this is a web server, where One PHP website is running and i have programmed this web to move the File between the Mounted drive within the Network.

Basically this Web app is providing the nice user interface , where user can put the files names and move within the all mounted Drives.

Mounted drives (some are smb /nfs and some mounted drives are FTP Destination.).

and today suddenly i have got this error message :

Unable to create file /tmp/testfile: No space left on device  

when i just want to create a test file and after doing df -h i found out the /dev/sda1 has 0 % space left and and nothing was possible on the server. and then i rebooted my server and then again my system was working fine and df -h command gave me the result that /dev/sda1 again has more then 95% free space.

i am trying to figure out why did i have this issue over my server?

does it has something to do with my web app?

thanks in advance.


The only folder which gets cleaned at every reboot regardless of the running processes, which might handle their temporary files differently, e.g. by storing them into other places and / or by removing them from /tmp or from other places during the execution, AFAIK, is /tmp, so it's likely (but indeed not sure) that it's /tmp that got cluttered.

What I'd suggest you to do is to check /tmp's size from time to time and to see if it gets cluttered, and then try to dig out which process / processes are causing the problem checking the biggest or most numerous files.

I don't think the webapp itself might be causing this tough, unless it's starting some external process or unless it's the webapp itself that is putting the temporary files in /tmp; just to be sure, I'd also monitor the folders in the webapp's scope to check if a process started from the webapp itself is cluttering one of those.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »