mySQL random crash

urbee

Verified User
Joined
Mar 27, 2009
Messages
118
We're having some issues on one of our DA installations - i realize this is not directly DA related but anyhow -maybe someone experienced similar problems.

mySQL keeps crashing on random occasions. Seems like it tries to restart itself but on restart the /tmp/mysql.sock exists so its unable to start.

Here are the logs:

Code:
120911 12:08:04 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.65'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server (GPL)
121002 22:11:15 mysqld_safe Number of processes running now: 0
121002 22:11:16 mysqld_safe mysqld restarted
121002 22:11:18 [Note] Plugin 'FEDERATED' is disabled.
121002 22:11:19  InnoDB: Initializing buffer pool, size = 8.0M
121002 22:11:19  InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
121002 22:11:19  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
121002 22:11:19 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
121002 22:11:19 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
121002 22:11:19 [Note] Plugin 'FEDERATED' is disabled.
121002 22:11:19 [Note] Plugin 'FEDERATED' is disabled.
121002 22:11:19  InnoDB: Initializing buffer pool, size = 8.0M
121002 22:11:19  InnoDB: Initializing buffer pool, size = 8.0M
121002 22:11:19  InnoDB: Completed initialization of buffer pool
121002 22:11:19InnoDB: Unable to lock ./ibdata1, error: 11
  InnoDB: Completed initialization of buffer pool
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
121002 22:11:19  InnoDB: Retrying to lock the first data file
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.
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.
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.
InnoDB: Unable to lock ./ibdata1, error: 11
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.
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
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.
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.
InnoDB: Unable to lock ./ibdata1, error: 11
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.
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
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.
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
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.
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
121002 22:11:27  InnoDB: Started; log sequence number 0 2916752
InnoDB: Unable to lock ./ibdata1, error: 11
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.
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
121002 22:11:27 [Note] Event Scheduler: Loaded 0 events
121002 22:11:28 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.65'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server (GPL)
InnoDB: Unable to lock ./ibdata1, error: 11
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.
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
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.
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.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
121002 22:13:22InnoDB: Error in opening ./ibdata1
  InnoDB: Unable to open the first data file
121002 22:13:26  InnoDB: Operating system error number 11 in a file operation.
InnoDB: Error in opening ./ibdata1
121002 22:13:26  InnoDB: Operating system error number 11 in a file operation.
InnoDB: Error number 11 means 'Resource temporarily unavailable'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
InnoDB: Error number 11 means 'Resource temporarily unavailable'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
121002 22:13:27 [ERROR] Plugin 'InnoDB' init function returned error.
121002 22:13:27 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
121002 22:13:28 [ERROR] Plugin 'InnoDB' init function returned error.
121002 22:13:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
121002 22:13:29 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
121002 22:13:29 [ERROR] Do you already have another mysqld server running on port: 3306 ?
121002 22:13:29 [ERROR] Aborting

121002 22:13:29 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

121002 22:13:30 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
121002 22:13:30 [ERROR] Do you already have another mysqld server running on port: 3306 ?
121002 22:13:30 [ERROR] Aborting

121002 22:13:30 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

121002 22:13:30 mysqld_safe mysqld from pid file /usr/local/mysql/data/server.pid ended
121002 22:13:35 mysqld_safe mysqld from pid file /usr/local/mysql/data/server.pid ended
121002 22:14:24 mysqld_safe mysqld from pid file /usr/local/mysql/data/server.pid ended

Any ideas? I've noticed similar issues on one other DA installation but have yet to check if its the same error.
 
Hello,

Did you try to follow this

InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
?

By the way do you really need InnoDB? And MySQL 5.1 instead of MySQL 5.5?
 
I have upgraded to 5.5 now.

I tried skip-innodb but the site was extremely slow then. I used "default-storage-engine=myisam". Does this have to do anything with it?

I guess its too late to remove the ibdata now since its full of something?
 
I tried skip-innodb but the site was extremely slow then. I used "default-storage-engine=myisam". Does this have to do anything with it?

Note, you should make sure, that none of your DBs is using InnoDB, if you don't use it, you'd better disabled it, or completely rebuild the InnoDB files. Of course make sure, you've got dumps and backups of all DBs. Roundcube is using by default InnoDB. Please consider I don't guarantee that you might or might not break anything trying to solve the issue. I do guarantee only that part of work, which I do myself.
 
Search these forums for suggestion on how to choose which my.cnf configuration to use.

Jeff
 
Back
Top