[ale] Dealing with really big log files....

David Ritchie deritchie at gmail.com
Mon Mar 23 13:34:44 EDT 2009


 Does mysql have an signal option to close and reopen its log file?
After briefly poking around google,
it appears you might also see if 'mysqladmin flush-logs' would be at
all helpful...
It appears at least close and reopen logfiles under MySql 5.0. See
http://doc.51windows.net/mysql/?url=/mysql/ch05s12.html for more
detail...

If it can wait until the next time mysql is restarted,you can do

   cp -p file_name new_file_name
   cat /dev/null > file_name

to truncate the logfile (mysql will continue to log into the old file
until it stops/restarts).

As I recall, vi will crash/hang when trying to inhale files bigger
than the maximum process data segment \size (as I recall, it tries to
suck the entire file into memory).

-- Dave


More information about the Ale mailing list