Fixed Infinite HTTP requests : running AJAX job.php

Good to know.

@Nirjonadda @Breixo @The Dark Wizard do either of you use any of the add-ons mentioned, perhaps most particularly Tapatalk?

I'm not so sure User Mentions Improvements is related as most stuck jobs I've seen don't exclusively contain mention alerts, but please do list any add-ons so we can see if there's a pattern.
 
Good to know.

@Nirjonadda @Breixo @The Dark Wizard do either of you use any of the add-ons mentioned, perhaps most particularly Tapatalk?

I'm not so sure User Mentions Improvements is related as most stuck jobs I've seen don't exclusively contain mention alerts, but please do list any add-ons so we can see if there's a pattern.
Using both addons.
I'll send a list with all I use at the moment via PM.
Thanks for your reply.
 
I don't use Tapatalk but I do use that addon by @Xon and several others. When we did the whole process of truncating and duplicating the table, it started to get better. Though we are still not aware of what caused it to begin with and if it will happen again.
 
The problem has improved when I removed this code. I do it once now I do not know what caused it. There may be a problem when we passed 1.5 version.
 

Attachments

I'm not so sure User Mentions Improvements is related as most stuck jobs I've seen don't exclusively contain mention alerts, but please do list any add-ons so we can see if there's a pattern.
User Mentions Improvements kicks stuff to a job faster than XF standard, but it doesn't touch the job continue/finish logic.
 
Just found out that I have the same problem :(

But I don´t really understand what to do now.... can someone please explain for non-mysql-experts?:D

Oder gibt es hier jemanden der mitliest und mir die Lösung auf deutsch erklären kann?
(Or can someone explain this to me in german?)
 
Currently the recommended workaround is to duplicate your xf_job table (and its contents e.g. xf_job_bak) and then empty/truncate the original table.

Now it seems like the cron jobs stopped working :(
Next run for all is frozen to 17.7. but we already have 20.07.

The date even does not change if I click on "Run now" .
 
Now it seems like the cron jobs stopped working :(
Next run for all is frozen to 17.7. but we already have 20.07.

The date even does not change if I click on "Run now" .

  • XenForo can be reinstalled
  • Connect phpmyadmin export job.sql
  • Your xenforo import again.
  • Have fun :)

problem originated from the XF: Notifier table written in job.sql.

@Chris D needs to examine and fix it.
 
We're also having this issue again. Other than once again purging the jobs table in the database, I don't know what to do about it. I know very little about the inner workings of xenForo, and there is no documentation on how the jobs manager works, so I would have an incredibly difficult time trying to track down what is happening.
 
We're also having this issue again. Other than once again purging the jobs table in the database, I don't know what to do about it. I know very little about the inner workings of xenForo, and there is no documentation on how the jobs manager works, so I would have an incredibly difficult time trying to track down what is happening.
Hope they find the way to solve this soon.
 
So far not seeing anything obvious from the databases that I've had access to.

If it happens again, this time instead of clearing the job table, please submit a new ticket (or reply to an existing one if you have one open) and provide your FTP, Admin CP and database (PhpMyAdmin is ideal) login details and we'll dive deeper into the code to find the problem/cause.
 
This is a bug introduced in XF 2.0.5 when the "Watched Thread" notifier was made to be conditionally loaded by XF\Service\Post\Notifier

Problem code in XF\Service\AbstractNotifier
PHP:
    public function hasMore()
    {
        $this->ensureDataLoaded();

        foreach ($this->notifyData AS $type => $toProcess)
        {
            if ($toProcess)
            {
                return true;
            }
        }

        return false;
    }

Fix:
PHP:
    public function hasMore()
    {
        $this->ensureDataLoaded();
      
        foreach ($this->getNotifiers() AS $type => $notifier)
        {
            if (!empty($this->notifyData[$type]))
            {
                return true;
            }
        }

        return false;
    }
 
This is a bug introduced in XF 2.0.5 when the "Watched Thread" notifier was made to be conditionally loaded by XF\Service\Post\Notifier

Problem code in XF\Service\AbstractNotifier
PHP:
    public function hasMore()
    {
        $this->ensureDataLoaded();

        foreach ($this->notifyData AS $type => $toProcess)
        {
            if ($toProcess)
            {
                return true;
            }
        }

        return false;
    }

Fix:
PHP:
    public function hasMore()
    {
        $this->ensureDataLoaded();
     
        foreach ($this->getNotifiers() AS $type => $notifier)
        {
            if (!empty($this->notifyData[$type]))
            {
                return true;
            }
        }

        return false;
    }
Tried but got several errors:
Code:
ErrorException: [E_WARNING] Invalid argument supplied for foreach() src/XF/Service/AbstractNotifier.php:146
Code:
ErrorException: [E_NOTICE] Undefined property: SV\UserMentionsImprovements\XF\Service\Post\Notifier::$getNotifiers src/XF/Service/AbstractNotifier.php:146
 
@Breixo what version of php? Try this instead

PHP:
    public function hasMore()
    {
        $this->ensureDataLoaded();
        $notifiers = $this->getNotifiers();
        if (!$notifiers)
        {
            return false;
        }

        foreach ($notifiers AS $type => $notifier)
        {
            if (!empty($this->notifyData[$type]))
            {
                return true;
            }
        }

        return false;
    }
 
@Breixo what version of php? Try this instead

PHP:
    public function hasMore()
    {
        $this->ensureDataLoaded();
        $notifiers = $this->getNotifiers();

        foreach ($notifiers AS $type => $notifier)
        {
            if (!empty($this->notifyData[$type]))
            {
                return true;
            }
        }

        return false;
    }
PHP 7.x
 
Last edited:
Top Bottom