Page 1 of 1

Log files are taking up all the space.

Posted: Tue Oct 20, 2015 4:39 am
by king718
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:

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
    
Entered this:

Code: Select all

du -shm /var/log/* |sort -n|tail -n 10
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?

Re: Log files are taking up all the space.

Posted: Tue Oct 20, 2015 7:26 pm
by skurudo
No space left on device, really?

df -h
df -i
?

Re: Log files are taking up all the space.

Posted: Wed Oct 21, 2015 2:15 am
by king718

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.

Posted: Mon Oct 26, 2015 4:16 am
by king718
Anyone?

Re: Log files are taking up all the space.

Posted: Mon Oct 26, 2015 6:21 am
by SCelik
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/