XF 2.2 There are scheduled jobs outstanding which have not run

  • Thread starter Thread starter Deleted member 241496
  • Start date Start date
D

Deleted member 241496

Guest
I know this has been discussed several times but they are all older posts and none of their solutions are working for us. This error just started showing up this week for us:
Screenshot 2021-11-02 1.30.18 PM.webp
We have checked the following from the other posts:
  • Tried reloading the page, does nothing
  • jobRunTrigger is set to 'activity based trigger'
  • No errors show on the server error log
  • Tried turning off and turning back on different cron jobs
  • All the cron jobs show upcoming, none are in the past
 
That's not really a solution.

That message should never be shown for a site which has regular visitors, so further investigation may be required.
 
It should never happen (unless it's a test/dev installation which has no traffic), so you need to investigate to determine the cause.
 
SOLVED by @electrogypsy. Emptied xf_job table after doing a database backup and now the message is gone. You can close this thread!

The xf_job table should never be emptied. There are two jobs that always require to be there. These two:

1-processed.jpg
 
No the master rebuild put both rows back. The error message isnt showing, the cron jobs are working, and those two lines are in xf_job
 
I was advised in another thread to empty the xf_job table, on account of (I think) a similar error.

Are you able to use phpmyadmin? If so, look up the xf_jobs table and empty it.

The xf_job table should never be emptied.

So now I am confused about how to deal with the error - a similar one today (below). Any ideas anyone please?

Code:
F\Db\DeadlockException: Error rendering widget: MySQL query error [1213]: Deadlock found when trying to get lock; try restarting transaction src/XF/Db/AbstractStatement.php:230
Generated by: Unknown account Nov 7, 2021 at 4:33 PM
Stack trace
INSERT  INTO `xf_job` (`execute_class`, `execute_data`, `unique_key`, `manual_execute`, `trigger_date`) VALUES (?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE
            execute_class = VALUES(execute_class),
            execute_data = VALUES(execute_data),
            manual_execute = VALUES(manual_execute),
            trigger_date = VALUES(trigger_date),
            last_run_date = NULL
     
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL query err...', 1213, '40001')
#1 src/XF/Db/Mysqli/Statement.php(79): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1213, '40001')
#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/Job/Manager.php(527): XF\Db\AbstractAdapter->insert('xf_job', Array, false, '
            execute_cla...')
#5 src/XF/Job/Manager.php(469): XF\Job\Manager->_enqueue('searchForumCach...', 'XF:SearchForumC...', Array, false, 1636302783)
#6 src/addons/SV/UserEssentials/XF/Job/Manager.php(19): XF\Job\Manager->enqueueUnique('searchForumCach...', 'XF:SearchForumC...', Array, false)
#7 src/XF/Repository/SearchForum.php(156): SV\UserEssentials\XF\Job\Manager->enqueueUnique('searchForumCach...', 'XF:SearchForumC...', Array, false)
#8 src/XF/Widget/SearchForum.php(71): XF\Repository\SearchForum->enqueueCacheRebuildIfNeeded(Object(XF\Entity\SearchForum))
#9 internal_data/code_cache/widgets/_56_sf_popular.php(5): XF\Widget\SearchForum->render()
#10 src/XF/Template/Templater.php(7509): XF\SubContainer\Widget->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Array)
#11 src/XF/SubContainer/Widget.php(168): XF\Template\Templater->renderWidgetClosure(Object(Closure), Array)
#12 src/XF/Template/Templater.php(1928): XF\SubContainer\Widget->getCompiledWidget(Array, Array)
#13 internal_data/code_cache/templates/l1/s109/public/thread_view.php(1262): XF\Template\Templater->widgetPosition('thread_view_sid...', Array)
#14 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#15 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('thread_view', Array, true, NULL)
#16 src/XF/Template/Templater.php(1642): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:thread_v...', Array, true, NULL)
#17 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('thread_view_typ...', Array, true, NULL)
#18 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:thread_v...', Array)
#19 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#20 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\ViewT...', 'public:amp_thre...', Array)
#21 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#22 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#23 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#24 src/XF/App.php(2345): XF\Mvc\Dispatcher->run()
#25 src/XF.php(512): XF\App->run()
#26 index.php(20): XF::runApp('XF\\Pub\\App')
#27 {main}
Request state
array(4) {
  ["url"] => string(39) "/threads/grassi-saxophones.13245/?amp=1"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["amp"] => string(1) "1"
  }
  ["_POST"] => array(0) {
  }
 
Last edited:
@Mr Lucky - I emptied the xf_job table as well per the other posting I saw. However, after reading this, there should always be two rows kept in there. I went to my site directory install URL, and rebuilt the install, which fixed the XF_JOB back to normal. I'm not sure about the error code you show above, but hopefully if emptying XF_JOB fixed it, then if you just rebuild the table you should be fine?
 
Top Bottom