Fixed Infinite HTTP requests : running AJAX job.php

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;
    }
Thanks a lot Xon!
1534098004870.webp
 
I just had this issue (server sent thousands of the same 3 emails; AWS shut me off); read the full thread -- I do not use these add-ons. I am hosted on AWS an was using Ezoic via cloudflare. Started backing things out because I've been troubleshooting for about 8 hours... too much. :-/

I emptied the xf_job table, and at least the non-stop email issue is resolved for the moment.
 
I still facing that issue after upgrade my board to xenforo 2.1 from 1.5

I've tried to truncate the xf_job table from xenforo database and it is empty now but cronjobs doesn't run automatically. It shows past dates for next run time.

I must run the all cronjob manually now, how can i fix that ? I though, there are a bug or need any server configuration for fix that?

@Xon @Chris D

p.s: I faced this issues even not installed any add-on so after fresh xenforo upgrade...
 
I did but still same..

that problem may related with your redis cache add-ons? Because i’m using only your redis cache and optimization add-ons and user activity - user mention improvements add-ons.

cronjobs still show the past date as next run time? For example; user group promotions cron says that next run time: 1 september 2019 - 00:20

But now date 1 september 2019 - 22:05
 
So disable those addons and see if the problem still exists?
Yes, i disabled all add-ons also tried to disabled event listeners via config.php

For now, time is 2 september - 02:05 (UTC+3) in forum, but next run time of cron look like that 1 september 23:15

past time depend of forum time.

So crons doesn't work. Even tried truncate xf_jobs table
 
For now, time is 2 september - 02:05 (UTC+3) in forum, but next run time of cron look like that 1 september 23:15

You do realise that times in the database will be in UTC?

So if you are UTC+3, and the next cron trigger will be at 23:15 - that actually means the next cron trigger will be at 02:15 UTC+3 ... which sounds about right.
 
Yes if times like this (based on utc+0) it looks run right now after i disabled all of redis cache and optimize add-ons by @Xon

so that problem should be related with them. 😔
 
I confirm that, after disabled @Xon 's Redis Cache add-ons, crons are running well.
It should be related a bug between xon's redis add-ons and forum cron.

Hope, he may find and fix that on his add-ons. I will follow the updates.
 
Yes i've already installed the first your cache add-ons after upgrade the xenforo immediately.
So now disabled them, cronjobs works.

I'll let you know by enabling the add-ons step by step for which add-on couse that problem
 
I don't use these addons, but do use caching, and can confirm this devastating "bug" or whatever it is -- it has wreaked havoc on my site, to the degree that I changed my admittedly-overly-complex site configuration, which included a load balancer and other components. I've simplified the configuration and so far, no problems-- but the past trigger of the issue (for me) was sending out a mass email via adminCP. The impact was that the server would NOT stop sending out repetitive emails... thousands by the minute. Not good for IP reputation. The only way to solve it was to empty the xf_job and xf_mailqueue tables. I do plan to send another newsletter soon from the new config, but I'm wary!
 
I have problem with job.php now. I don't know why this is happening. I have been using last version of xenforo.

Any idea to solve it? Thanks in advance.
 
Top Bottom