Log files are taking up all the space.
Log files are taking up all the space.
This is my first time building a site on a VPS Server. Mysql shut down and won't restart. I looked at the errorlog and this is what it said:
Entered this:
and it said:
1 /var/log/user.log
1 /var/log/vsftpd.log
1 /var/log/wtmp
1 /var/log/wtmp.1
2 /var/log/vsftpd.log.3
3 /var/log/auth.log.1
6 /var/log/vsftpd.log.1
6 /var/log/vsftpd.log.2
6 /var/log/xferlog
140 /var/log/apache2
Don't know where to go from here really? How can I fix this?
Code: Select all
2015/10/19 21:59:41 [alert] 1956#0: *202471 write() to "/var/log/apache2/domains/sitename.com.bytes" failed (28: No space left on device) while logging request, client: 186.67.166.46, server: sitename.com, request: "GET /site/plugins/image-watermark/js/no-right-click.js?ver=1.5.1 HTTP/1.1", host: "www.sitename.com", referrer: "http://twitter.com"
2015/10/19 22:00:32 [alert] 1956#0: *202787 write() to "/var/log/apach
Code: Select all
du -shm /var/log/* |sort -n|tail -n 10
1 /var/log/user.log
1 /var/log/vsftpd.log
1 /var/log/wtmp
1 /var/log/wtmp.1
2 /var/log/vsftpd.log.3
3 /var/log/auth.log.1
6 /var/log/vsftpd.log.1
6 /var/log/vsftpd.log.2
6 /var/log/xferlog
140 /var/log/apache2
Don't know where to go from here really? How can I fix this?
Re: Log files are taking up all the space.
No space left on device, really?
df -h
df -i
?
df -h
df -i
?
Re: Log files are taking up all the space.
Code: Select all
df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 9.9G 9.9G 0 100% /
udev 10M 0 10M 0% /dev
tmpfs 197M 176K 197M 1% /run
/dev/vda1 9.9G 9.9G 0 100% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 393M 0 393M 0% /run/shm
tmpfs 393M 4.0K 393M 1% /tmp
Code: Select all
df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
rootfs 655360 59077 596283 10% /
udev 250012 293 249719 1% /dev
tmpfs 251518 245 251273 1% /run
/dev/vda1 655360 59077 596283 10% /
tmpfs 251518 2 251516 1% /run/lock
tmpfs 251518 2 251516 1% /run/shm
tmpfs 251518 2 251516 1% /tmp
Re: Log files are taking up all the space.
You can not (must not) disable logs. But you can set up proper logrotation with compression to those files?
http://www.thegeekstuff.com/2010/07/logrotate-examples/
http://www.thegeekstuff.com/2010/07/logrotate-examples/