My google skills are failing me here. There’s definitely space on my server, about 51% actually. I’m getting this error when I try to restart apache:
mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: No space left on device /etc/init.d/apache2: 91: /etc/init.d/apache2: cannot create : Directory nonexistent *
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
i have problem with apache2 not runing when i start apace2 that error show
mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: No such file or directory /etc/init.d/apache2: 91: /etc/init.d/apache2: cannot create : Directory nonexistent
Please help me how can i fix this problem my all websites gose down … please help
I have resolved the issue. Find the largest directory and clear if its safe.
Steps :
First I found the large size folder with ssh : du -h --max-depth=1 recursively started from root and kept on repeating till I found the exact folder. Once I found that folder in my case it was var/session folder it was more than 7GB , I deleted the folder (It was safe to delete as I was ok with loosing the session data ) and restarted the server. Ssh- root-yourserver/var/www/html/var#: rm -rf session recreated the directory session once again. You can delete the files inside but for me it was taking too long to delete individual files so I deleted the folder which was fast . It worked. The session folder was very big because of lot of session files. In your case it may anything which is suspiciously very big, may be log file folder or 3rd party extension folder, find that folder and if its safe to delete it, clear that folder and restart the server. ssh: service apache2 restart
You’ll need to free up your inode usage Run:
$ sudo df -i
to see your inode usage then you can run
$ for i in /*; do echo $i; find $i |wc -l; done
run this for each directory with very large number of files.
For example if you get:
/var
1002793
You can then run:
$ for i in /*; do echo $i; find $i |wc -l; done
Once you get to the directory containing the huge number of small files you can delete all those files if they are not so important or move them to another system or device. Simple type:
$ rm -rf /directory_containing_annoying_small_files/
That’s it. Check again by running
$ df -i
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.