The InnoDB log sequence number is in the future

TheBigK

Well-known member
Our site was getting intermittent database errors and I asked my webhost to check what's happening. After some inspection they found that the database has few issues and tried repairing it. Finally I got following message from them-

----------

I have attempted every repair on the InnoDB database and we are still getting
the InnoDB log sequence number is in the future. At this point to get the
ibdata and the iblogfile to match up once again we will need to restore the
MySQL directory (which includes databases) from the backup we have on the
server. The process should not take to long but there will be some downtime
associated with a restore like this. If this is not the best time to restore
the MySQL directory I can schedule this for a different time. Please let me
know how you would like to proceed with this.
-----------

Can someone tell me what'd be the best way to address this issue. I really don't want to lose out on any data and want the dB to be repaired.

PS: If you need more information, please let me know and I'll get it from our web hosts.

Would really appreciate your help.
 
Can you post the exact errors?

Sure, let me dig out the errors that I sent to the web host. The most frequent error was that all the sessions were getting terminated at intervals which would make number of online guests go down to 0 from 600+. All the logged in member sessions were getting terminated as well.
 
Here are the different errors we experienced -

Code:
Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2) -
library/Zend/Db/Adapter/Mysqli.php:333

Code:
Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line
632 Zend_Db_Adapter_Abstract->update() in XenForo/Model/Conversation.php at
line 1029 XenForo_Model_Conversation->_updateConversationReadDate() in
XenForo/Model/Conversation.php at line 947
XenForo_Model_Conversation->markConversationAsRead() in
XenForo/ControllerPublic/Conversation.php at line 217
XenForo_ControllerPublic_Conversation->actionView() in
XenForo/FrontController.php at line 313 XenForo_FrontController->dispatch()
in XenForo/FrontController.php at line 132 XenForo_FrontController->run()
in /home/<USER>/public_html/index.php at line 13
 
Here are the different errors we experienced -

Code:
Can't connect to local MySQL server through socket

This means that Mysql is not available (database server died). That doesn't sound like a Xenforo problem or even a problem of your database.

See http://docs.oracle.com/cd/E19957-01/mysql-refman-5.5/error-handling.html#error_cr_connection_error

The error (2002) Can't connect to ... normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.
 
This means that Mysql is not available (database server died). That doesn't sound like a Xenforo problem or even a problem of your database.

See http://docs.oracle.com/cd/E19957-01/mysql-refman-5.5/error-handling.html#error_cr_connection_error
I also read that frequently that error is caused by a hardware outage and the data that is being written being corrupted? Sounds more like a hosting problem than a xF problem (but others have the error with mySQL and it's usually attributable to the server itself).
 
Top Bottom