0

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.

kunal
  • 432
  • 1
  • 8
  • 23

1 Answers1

2

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.

kos
  • 35,535
  • 13
  • 101
  • 151
  • hey @kos, I also want to add little bit more detail about the web app, i am using `ssh2_exec` php function to run the linux command from web and i am assuming the i was not handling clearly logout session within the code and maybe all the session over the time period made the memory full? by the way thanks for the reply i am adding this info to make my question clear. – kunal Aug 10 '15 at 19:20
  • and the memory was that full that i couldnt even use the `cd` command – kunal Aug 10 '15 at 19:21