Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Mysql log file too large

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
vapaka
Posts: 1
Joined: Fri Mar 11, 2022 6:54 am

Os: Ubuntu 17x
Web: apache + nginx
Mysql log file too large
  • Quote

Post by vapaka » Fri Mar 11, 2022 6:57 am

My server had 100% disk usage.
Upon investigating, I found that mysql log file was taking 36GB of space.
How do I prevent it from happening again?

Location of log file:
/var/lib/mysql/vestacp.log

I am running ubuntu 20.04 and Hestia version v1.5.10.
Top

sandro
Support team
Posts: 87
Joined: Sun Aug 30, 2020 11:02 am

Os: CentOS 6x
Web: apache + nginx
Re: Mysql log file too large
  • Quote

Post by sandro » Mon Mar 21, 2022 12:17 pm

One solution is to use the logrotate command via cron.
Top

nina266
Posts: 1
Joined: Thu Mar 10, 2022 3:14 pm
Contact:
Contact nina266
Website

Os: CentOS 6x
Web: apache + nginx
Re: Mysql log file too large
  • Quote

Post by nina266 » Mon Mar 28, 2022 8:07 am

sandro wrote: ↑
Mon Mar 21, 2022 12:17 pm
One solution is to use the logrotate command via cron.
Hello, how to do that please?
Top

sandro
Support team
Posts: 87
Joined: Sun Aug 30, 2020 11:02 am

Os: CentOS 6x
Web: apache + nginx
Re: Mysql log file too large
  • Quote

Post by sandro » Thu Mar 31, 2022 1:05 pm

Try including the following lines in the /etc/logrotate.d/vesta file:

/var/lib/mysql/vestacp.log {
create 600 mysql mysql
missingok
notifempty
daily
rotate 3
compress
}

Check that files like vestacp.log-20220331.gz are created in the /var/lib/mysql directory and make the necessary adjustments to make it the way you need it.
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password