MySQL error.log out of control

Hi,

I recently started experimenting with creating a MySQL DB using InnoDB tables. I recreated one of my existing databases and then altered the tables to be InnoDB. This was about two weeks ago, and I have done little since.

I noticed today that my /var/log/mysql/error.log file was filling up the volume at about 1.2 GB. The following lines are repeated ad nauseam.

InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.

Any ideas of how to fix this?

I deleted the error.log file (and recreated it), but have not been able to reclaim the disk space. I will be restarting the mysql service when there is less load on the server in a couple hours, and hope that will do it. I also deleted the entire cloned DB with InnoDB tables.

Thanks, Josh

4 Replies

Running the following did not seem to immediately help release disk space:

sudo service mysql restart

Just an idea: You might have a zombie process that is holding onto your InnoDB data file as well as the error log. Stop the MySQL server, and run ps aux to check if there are any remaining MySQL processes. Kill them all before starting MySQL again.

Also, make sure logrotated is working.

Thanks using ps aux and killing the remaining processes worked.

The other mysql logs are rotating, just not this error. I will check in to that. Any ideas where to look?

Thanks, Josh

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct