View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Feb 11, 2007 10:19 pm 
Offline
Joined: Fri Nov 04, 2005 7:11 am
Posts: 61
I've had two episodes of large log files leading to crashes. When I looked at the disk, sda1 was 100% full. The two offenders were the mysql binary log files in /var/log/mysql and the .xsession-errors file hidden in the mythtv home directory. (I used "du -sh *" to track down where all the space had gone.) Is there a safe way to stop these files from running amuck? Specically, is there a way to limit their size without getting rid of them entirely.

_________________
BE: R8.4, HVR2250, MCE media center remote, GigaByte GA-EP43-UD3L, 2gb ram

FE: Linhes 8.4, Mythbuntu, Linux Mint DE


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 9:18 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
The log rotation stuff should be doing that, but it may be time based rather than size based... You should be able to configure it to trigger on log size... You may also need to change the crontab to have it run hourly rather than the current daily.

See:
Code:
man logrotate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 9:22 pm 
Offline
Joined: Fri Nov 04, 2005 7:11 am
Posts: 61
I'm not sure if logrotate is supposed to do anything with the mysql binary logs. my understanding is that this is supposed to act as a data backup so that you can take your backup and then play back the binary logs since the time of that backup to bring the mysql database back to the moment of the failure. It would seem counterintuitive for logrotate to destroy this data. I think it would be better to figure out how to turn off this feature. I'm sure its handy for banks and web based businesses but I'm not in need of up-to-the-minute data integrity for my tv shows. Particularly when the feature is crashing my computer and corrupting my databases.

I'll try to figure out how to get logrotate to pick up the /home/mythtv/.xsession-errors file.

_________________
BE: R8.4, HVR2250, MCE media center remote, GigaByte GA-EP43-UD3L, 2gb ram

FE: Linhes 8.4, Mythbuntu, Linux Mint DE


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 9:31 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
If you mean the ib_logfile0, ib_logfile1 and ibdata1 files, there is a way to resize those too. The default seems to be only ~5-10Mb which isn't all that big.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 9:57 pm 
Offline
Joined: Fri Nov 04, 2005 7:11 am
Posts: 61
I ran logrotate with the -f option so that it would run more often than once daily. It didn't touch the /var/log/mysql/mysql-bin.????? files or the /home/mythtv/.xsession-errors files.

_________________
BE: R8.4, HVR2250, MCE media center remote, GigaByte GA-EP43-UD3L, 2gb ram

FE: Linhes 8.4, Mythbuntu, Linux Mint DE


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 09, 2007 6:45 pm 
Offline
Joined: Tue Oct 25, 2005 7:04 am
Posts: 58
Location: Victoria, BC
Sorry to bump an old post, but I was having the same issues with the mysql binary logs.

Basically, in order to clear the logs:
Code:
mysql -u root

Then in mysql:
Code:
reset MASTER;
exit

I then edited /etc/mysql/my.cnf to disable the binary logs:
Code:
#log_bin                      = /var/log/mysql/mysql-bin.log
#expire_logs_days     = 10
#max_binlog_size         = 100M

Then, restart mysql:
Code:
/etc/init.d/mysql restart

Hope it helps...


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: Bing [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu