XF 1.4 xf_deferred causing issues

Rodolfo

Active member
Hi there,

Few days ago I experienced an issue with my server and since then xf_deferred is causing issues. Most annoying thing is that in the admin front-end I got this error:

Code:
Mysqli statement execute error : Can't find record in 'xf_deferred'

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 XenForo/Model/Deferred.php at line 111
XenForo_Model_Deferred->defer() in XenForo/Application.php at line 1455
XenForo_Application::defer() in XenForo/Model/Cron.php at line 398
XenForo_Model_Cron->updateMinimumNextRunTime() in XenForo/Model/Cron.php at line 421
XenForo_Model_Cron->retriggerCron() in XenForo/ControllerAdmin/Home.php at line 7
XenForo_ControllerAdmin_Home->actionIndex() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /public_html/community/admin.php at line 13

I had the same issue when upgrading my forum but I just deleted the contents of the xf_deferred table and that allowed me to upgrade the board. Now xf_deferred has no rows but I still got the error in the admin panel.

The issue seems to be in the process email bounces process, when I try to run that I get the error.

I've tried rebuilding caches, repairing tables, etc... What should I do to fix this thing?
 
Last edited:
That is a MySQL problem.

I have never seen this error. I searched Google and found some posts indicating possible corruption or replication issues.

You said you experienced a server issue a few days ago. What was the issue? More information might help.
 
The server issue was a crash in the hard disk, but the backup was ok because it was from several days ago. I was wondering if there is a way to reset all the cron thing because I get that error every time. I will try to dig the code to try to find what's going on.
 
Last edited:
That MySQL error has to do with MySQL itself, not XenForo's cron system. You should find that you get the same error if you try to run a direct query against that table.

One option is to drop and recreate that table with these queries:

Code:
	DROP TABLE xf_deferred;

	CREATE TABLE xf_deferred (
		deferred_id int(10) unsigned NOT NULL auto_increment,
		unique_key VARBINARY(50) default NULL,
		execute_class varchar(75) NOT NULL,
		execute_data mediumblob NOT NULL,
		manual_execute tinyint(4) NOT NULL,
		trigger_date int(11) NOT NULL,
		PRIMARY KEY  (deferred_id),
		UNIQUE KEY unique_key (unique_key),
		KEY trigger_date (trigger_date),
		KEY manual_execute_date (manual_execute,trigger_date)
	) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;

That might resolve the issue.
 
Back
Top Bottom