• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Duplicate Key errors

#1
Randomly I keep getting duplicate key errors and log in one case shows following:

#0 /home/dlifein/public_html/forums/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/dlifein/public_html/forums/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/dlifein/public_html/forums/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 /home/dlifein/public_html/forums/library/XenForo/DataWriter.php(1624): Zend_Db_Adapter_Abstract->insert('xf_thread_watch', Array)
#4 /home/dlifein/public_html/forums/library/XenForo/DataWriter.php(1613): XenForo_DataWriter->_insert()
#5 /home/dlifein/public_html/forums/library/XenForo/DataWriter.php(1405): XenForo_DataWriter->_save()
#6 /home/dlifein/public_html/forums/library/XenForo/Model/ThreadWatch.php(506): XenForo_DataWriter->save()
#7 /home/dlifein/public_html/forums/library/XenForo/Model/ThreadWatch.php(549): XenForo_Model_ThreadWatch->setThreadWatchStateWithUserDefault(2, 595, 'watch_email')
#8 /home/dlifein/public_html/forums/library/XenForo/ControllerPublic/Thread.php(562): XenForo_Model_ThreadWatch->setVisitorThreadWatchStateFromInput(595, Array)
#9 /home/dlifein/public_html/forums/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Thread->actionAddReply()
#10 /home/dlifein/public_html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#11 /home/dlifein/public_html/forums/index.php(13): XenForo_FrontController->run()
#12 {main}
What could this be due to?
 

Mike

XenForo developer
Staff member
#2
You've cut off the actual error, though I think you're just showing a race condition, which can be ignored.
 
#3
@Mike - here's the second part of the error (if that's what you meant by cutting off the error):

array(3) {
["url"] => string(116) "http://www.forums.dlife.in/threads/...er-results-than-gastric-banding.595/add-reply"
["_GET"] => array(0) {
}
["_POST"] => array(9) {
["message_html"] => string(160) "<p>LCHF would provide a far better result than both. But, since there's no money in LCHF for the drug industry, they will keep investing dollars against it.</p>"
["_xfRelativeResolver"] => string(107) "http://www.forums.dlife.in/threads/...ides-better-results-than-gastric-banding.595/"
["attachment_hash"] => string(32) "0f6ec98e6db9220339300a01b621e8fc"
["last_date"] => string(10) "1411738241"
["last_known_date"] => string(10) "1411738241"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(81) "/threads/gastric-bypass-surgery-provides-better-results-than-gastric-banding.595/"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}