XF 2.2 ACP Error - Job XF:Feeder: MySQL query error [1062]: Duplicate entry '4-1641832730903322626' for key 'PRIMARY'

btmgreg

Well-known member
I keep getting this error in the ACP peridocally throughout the day - Hope someone can help. Thank you

Server error log
  • XF\Db\DuplicateKeyException: Job XF:Feeder: MySQL query error [1062]: Duplicate entry '4-1641832730903322626' for key 'PRIMARY'
  • src/XF/Db/AbstractStatement.php:230
  • Generated by: Unknown account
  • 21 April 2023 at 9:23 PM

Stack trace​

INSERT INTO xf_feed_log (feed_id, unique_id, hash, thread_id) VALUES (?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(79): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(220): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1514): XF\Db\AbstractAdapter->insert('xf_feed_log', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1246): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Service/Feed/Feeder.php(197): XF\Mvc\Entity\Entity->save(false, false)
#7 src/XF/Service/Feed/Feeder.php(136): XF\Service\Feed\Feeder->logEntry(Array, Object(SV\ReportImprovements\XF\Entity\Thread))
#8 src/XF.php(625): XF\Service\Feed\Feeder->XF\Service\Feed\{closure}()
#9 src/XF/Service/Feed/Feeder.php(143): XF::asVisitor(Object(SV\BookmarkEssentials\XF\Entity\User), Object(Closure))
#10 src/XF/Service/Feed/Feeder.php(113): XF\Service\Feed\Feeder->importEntry(Array)
#11 src/XF/Job/Feeder.php(44): XF\Service\Feed\Feeder->importEntries()
#12 src/XF/Job/Manager.php(260): XF\Job\Feeder->run(7.81844)
#13 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.81844)
#14 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.81844)
#15 job.php(43): XF\Job\Manager->runQueue(false, 8)
#16 {main}

Request state​

array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(67) "https://www.behind-the-mask.net/articles/categories/the-jacksons.2/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Try disabling your ReportImprovements add-on and see if it still occurs.
Or make sure you are using the latest version of that add-on and if so, then do the above it if continues.
If that fixes the problem, then notify the developer.
 
Thanks! Will give that a go. I know its simple to some, I look at the stack trace and my eyes just explode - I find it hard where to look, or what it means. I don't mind dabbling with code, but it sometimes takes me a while - I tend to colour/highlight different portions as I work through.

Dyslexia is fun!
 
Doesn't appear to have made a difference, only it shows a different addon within the stack trace. Weird.

  • XF\Db\DuplicateKeyException: Job XF:Feeder: MySQL query error [1062]: Duplicate entry '4-1641832730903322626' for key 'PRIMARY'
  • src/XF/Db/AbstractStatement.php:230
  • Generated by: Unknown account
  • 22 April 2023 at 2:00 AM

Stack trace​

INSERT INTO xf_feed_log (feed_id, unique_id, hash, thread_id) VALUES (?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(79): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(220): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1514): XF\Db\AbstractAdapter->insert('xf_feed_log', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1246): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Service/Feed/Feeder.php(197): XF\Mvc\Entity\Entity->save(false, false)
#7 src/XF/Service/Feed/Feeder.php(136): XF\Service\Feed\Feeder->logEntry(Array, Object(TickTackk\ChangeContentOwner\XF\Entity\Thread))
#8 src/XF.php(625): XF\Service\Feed\Feeder->XF\Service\Feed\{closure}()
#9 src/XF/Service/Feed/Feeder.php(143): XF::asVisitor(Object(SV\BookmarkEssentials\XF\Entity\User), Object(Closure))
#10 src/XF/Service/Feed/Feeder.php(113): XF\Service\Feed\Feeder->importEntry(Array)
#11 src/XF/Job/Feeder.php(44): XF\Service\Feed\Feeder->importEntries()
#12 src/XF/Job/Manager.php(260): XF\Job\Feeder->run(7.82736)
#13 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.82736)
#14 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.82736)
#15 job.php(43): XF\Job\Manager->runQueue(false, 8)
#16 {main}

Request state​

array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(39) "https://www.behind-the-mask.net/forums/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
For anyone this may help -

I found the solution after some help with @Bob (always a great help!) - It was the RSS function.

I was using a service called FetchRSS to pull RSS feeds from specific twitter accounts and it seems as of the start of this month, Twitter changed their API and broke the service. Since then, there's been no pulls.


I've run it manually, and it caused the same error - the pull interval was set at 60 minutes, so that makes sense for the above pattern. It's turned off now :)

Poxy Musk!
 
Back
Top Bottom