Tickets 1500 jobs (push alerts for Tickets) not getting triggered

Affected add-on version
2.10.2
Affected XenForo version
2.3.7
I dont know if this is a bug or not. In admin panel I have the following message:
There are scheduled jobs outstanding which have not run. Jobs may not be getting triggered when expected.

Looking in phpMyAdmin I see 1500 rows of XF\Job\PushSend in the xf_job table for Tickets:
Code:
a:3:{s:7:"payload";a:9:{s:5:"title";s:24:"New alert at Forum";s:4:"body";s:60:"You have a pending ticket. Please reply or close the ticket.";s:3:"url";s:37:"https://forum.com/tickets/3499/";s:5:"badge";s:55:"https://forum.com/styles/default/xenforo/bell.png";s:4:"icon";s:57:"https://forum.com/data/avatars/m/0/1.jpg?1533734485";s:3:"dir";s:3:"ltr";s:3:"tag";s:0:"";s:10:"tag_phrase";s:20:"(+ {count} previous)";s:12:"total_unread";i:11795;}s:14:"receiverUserId";i:312616;s:13:"subscriptions";a:1:{s:32:"bef6f56a9ad8b265869a4e8cdfe4f56f";b:1;}}

Maybe that's why Tickets was listed in this error?

Is it possible that these jobs are not getting triggered, because the members do not have enabled Push yet?
 
I dont know if this is a bug or not. In admin panel I have the following message:
There are scheduled jobs outstanding which have not run. Jobs may not be getting triggered when expected.

Looking in phpMyAdmin I see 1500 rows of XF\Job\PushSend in the xf_job table for Tickets:
a:3:{s:7:"payload";a:9:{s:5:"title";s:24:"New alert at Forum";s:4:"body";s:60:"You have a pending ticket. Please reply or close the ticket.";s:3:"url";s:37:"https://forum.com/tickets/3499/";s:5:"badge";s:55:"https://forum.com/styles/default/xenforo/bell.png";s:4:"icon";s:57:"https://forum.com/data/avatars/m/0/1.jpg?1533734485";s:3:"dir";s:3:"ltr";s:3:"tag";s:0:"";s:10:"tag_phrase";s:20:"(+ {count} previous)";s:12:"total_unread";i:11795;}s:14:"receiverUserId";i:312616;s:13:"subscriptions";a:1:{s:32:"bef6f56a9ad8b265869a4e8cdfe4f56f";b:1;}}
Is this a push notification you've triggered (i.e. by sending out a mass alert) as I don't recognise the phrasing? Are they actually "stuck" and not getting triggered or is your server processing them slowly?

It might be the latter in which case, the message is somewhat expected. In 2.3, push notifications (amongst other things) get queued up as individual jobs that run in the background as opposed to sending them synchronously which would have a negative impact on users. On larger sites, it is possible to see that message if a large number of notifications have been queued up and the job runner is working through them slowly.

If they're actually stuck and not being triggered, this isn't necessarily a Tickets issue but rather it might indicate you've got some other issue preventing push notifications from going out. Are there any other server error logs in this case? In your database, can you check if the database rows for these job entries have an attempts value higher than 0? There's also a xf_failed_job table which might have more clues.

Maybe that's why Tickets was listed in this error?
The error linked is unrelated to Tickets. Seems like it's something to do with thread prefixes perhaps which is not something Tickets touches.

Is it possible that these jobs are not getting triggered, because the members do not have enabled Push yet?
No, the job itself checks if the user has push notifications enabled. If they don't, it completes itself early.
 
I guess the number of jobs is caused by upgrade to xf2 and a large number of pending tickets being in the system. As we've recently upgraded most users do not have Push enabled yet.
3 attempts have been made for each of the 1500 jobs for tickets push. I don't know why its not firing.
In browser console I dont see any jobs running.
 
MattW says:
It's definitely an issue with the tickets addon, and how you have this set up for notifications. I would report it to Naz, as it's just adding more and more entries to the XF Job table for these push notifications.
Here is the way I have it set up:
Edit-ticket-escalation-Reminder-for-pending-tickets-Admin-control-panel.png
I have just added a few limitations to reduce the number of jobs:
Max 90 days old.
Last reply by staff.

There are 2k pending tickets.
 
Last edited:
If I run jobs trough CLI, then it says that all outstanding jobs have run. Yet, the xf_job table still has the entries. Now with 4 attempts.
 
MattW says:

Here is the way I have it set up:
View attachment 4117
I have just added a few limitations to reduce the number of jobs:
Max 90 days old.
Last reply by staff.

There are 2k pending tickets.
Ah okay, I didn't realise you had an escalation set up for this. That would explain why I didn't recognise the phrasing earlier:
Is this a push notification you've triggered (i.e. by sending out a mass alert) as I don't recognise the phrasing?

Just to be clear though, the issue is your push notifications aren't being processed which might not necessarily be an issue with the add-on. Tickets doesn't interact with push notifications directly, rather it just triggers a normal XF alert and XF is the thing that triggers a push notification in the normal way that it does.

With that in mind, I think the actual issue is within the job in core XF that sends out push notifications and how it reports failures (hence the attempts count is going up but there's no obvious error).

I'm going to look in to that a bit more this week and I'll report back.

In the meantime, probably best to disable that escalation for now so more push notification jobs aren't queued up.
 
Back
Top