Skip to main content

Questions tagged [queue]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
44 views

How to run the queue via CronJob?

I am Using Craft CMS 5.x and the Formie plugin. Form submissions are entered into the Craft CMS queue. When I enter the control panel, the queue runs and notification mails for form submissions are ...
flip's user avatar
  • 149
0 votes
0 answers
39 views

Queue process fails with unclear error ouput

I have a custom job queued, which in itself writes to the logs that the thing it is doing has been done successfully, however if I check the result in "Utilities" > "Queue Manager&...
7ochem's user avatar
  • 165
1 vote
1 answer
73 views

What is the best way to automatically add a job (queue) every day?

I would like to add a daily job that updates data. I have the following code: Event::on( Controller::class, Controller::EVENT_BEFORE_ACTION, static function (ActionEvent $event) { ...
antdev's user avatar
  • 137
6 votes
2 answers
211 views

Craft loses contact with database, and stops daemon

Somehow the queue/listen occasionally loses access to the database: FATAL Exited too quickly . Database Connection Error: Craft CMS can’t connect to the database. As the connection is lost, it ...
Eddie's user avatar
  • 61
2 votes
1 answer
56 views

Add to an asset field from a queue job

I'm following this to generate social share images from entries: https://ghijk.co.uk/blog/generate-dynamic-social-share-images-in-craft-cms It's working well. But I'd like to add the generated image ...
supazu's user avatar
  • 526
1 vote
1 answer
62 views

Job queue always failed to sync data into api/graphql with Getting unknown property of service

i have build a module to send entry value into a graphql mutation. so far running and succesfully, now with craft 4 (actually as 4.4.0), i plan to use job queue of craft. i add into queue before sync ...
Arham's user avatar
  • 11
0 votes
1 answer
159 views

Integrity constraint violation blocks queue

I have queue jobs called "Syncing element contents" which more often than not fail and shut down the whole control panel because the queue just gets backed up to over 170k jobs. I guess this ...
Sandro's user avatar
  • 53
0 votes
2 answers
132 views

Queue is failing

I have an issue with queue running... It always fails. The same with image transforms and so on...
Lukas Snarskis's user avatar
1 vote
1 answer
266 views

Best way to find current/pending jobs without knowing their ID in the queue

In Craft 2, you used to be able to do something like this to find pending tasks: craft()->tasks->getPendingTasks('MyPlugin_CustomTask') In Craft 3 we of course now have the Queue, however there ...
James White's user avatar
  • 1,171
1 vote
2 answers
185 views

Catching queue fail event

I have a queue that runs from a cron tab and I'd like to know immediately if it ever fails. Is there an event that fires or any other kind of way to hook into the queue behavior in a module when it ...
Brimby's user avatar
  • 343
1 vote
0 answers
200 views

Craft Queue not working when using AsyncQueue

When using the AsyncQueue plugin, the queue never processes and just backs up on all the tasks it has to do, no matter what they are (search indexes, form notifications, sitemaps, …). We already added ...
Sandro's user avatar
  • 53
1 vote
0 answers
51 views

Limiting image transform totals in queue?

In order to serve webp images where possible, and different sizes for different screens etc, I created a bunch of image transforms over the weekend - forgetting just how many images we have in the ...
Emma Swann's user avatar
1 vote
2 answers
236 views

Globals disappeared/Queue Failed — Propagating global sets

In desperate need of some help! I noticed on one of my multi-sites, 5 out of 8 sites have items missing in the Globals sidebar.. When I manually type in the URL to view one of the global items I get: ...
fbnntt's user avatar
  • 109
2 votes
1 answer
412 views

How to batch a large queue job?

I am trying to batch a large queue job in my custom plugin. Here is my service that starts the queue. public function doBackGroundJob() { $query = Entry::find(); if (!empty($...
joomkit's user avatar
  • 2,034
0 votes
0 answers
82 views

Why is my queue in custom plugin failing on VPS but not locally?

I am working on a background job in a custom plugin. On my local Laravel Valet setup it runs fine until it runs out of time. On my VPS which has same php version and memory settings (and mysql db) the ...
joomkit's user avatar
  • 2,034
1 vote
1 answer
580 views

Check for existing jobs in queue

Is it possible in code to search for a job/list out all jobs? I have built a plugin that scans an external API and I want to scan on an interval as well as allow the user to fire off a manual scan. I ...
Henry's user avatar
  • 11
1 vote
2 answers
263 views

Running a background job in a controller

I am trying to run a background job in a controller but wondering if its actually possible. I'm not sure about namespacing and could do with some guidance on whether the job should be running in the ...
joomkit's user avatar
  • 2,034
1 vote
2 answers
202 views

Specific emails failing in queue

I have craft 3.7.11 with commerce 3.4.2 installed. The majority of site emails send correctly, but every few days, one order status change email fails. The prior emails for these orders send correctly,...
Josh Parylak's user avatar
1 vote
2 answers
1k views

What server settings would be responsible to debug "The process has been signaled with signal 9" errors?

We're running Craft in an AWS environment that is configured using CentOS 7, Apache 2.4.x, PHP 7.4.x, PHP-FPM and we've noticed many of our queued tasks fail (sometimes only 8-10 minutes into the ...
Aaron Bushnell's user avatar
2 votes
1 answer
630 views

Parse variable to new queue job

Is there a way to parse a variable to a queue job? I want to re-send some Craft commerce emails via a cron job, so have created a console controller for the cron job to run a command against. This ...
Jaytrix's user avatar
  • 337
1 vote
1 answer
173 views

Server down (timeout) when optimize bundle of image (Image Optimize Plugin)

I try to use the Image Optimize plugin to optimize the image with default Craft Transform. There are lots of images to be optimized at the same time, I keep having the issue of server down. Here is ...
Lee's user avatar
  • 139
0 votes
0 answers
58 views

Resend commerce email

We have a site that had a feature/plugin created that can handle payment deposits as well as full payments for events. We're wanting to create a job (like a CRON Job) or process that once a week goes ...
Jaytrix's user avatar
  • 337
2 votes
1 answer
318 views

Force craft to do another job (queue) and pause the current one

I'm currently working on a plug-in for Craft. I have to work with a lot of data and, some steps are slow. So that's why I added them to a job system. This job is doing a lot of stuff. That job is ...
randomGuy's user avatar
1 vote
1 answer
583 views

How does the queue work?

I'm trying to find documentation on how the queue system works, and what parts of craft relies on it. To my current understanding, the queue is normally executed when users are logged in to admin, and ...
jishi's user avatar
  • 273
1 vote
1 answer
229 views

Error on functions in queue: “Session does not exist in a console request.”

I already experienced this same problem with Craft Commerce a while ago (Error on functions in queue: "Session does not exist in a console request.") and got a solution that solved the ...
chlsydkysr's user avatar
1 vote
1 answer
182 views

Delay Updating element slugs and URIs Job

On a large website, after using feedme to import some content it immediatelly triggers the "Updating element slugs and URIs" process that takes very long time to complete. Is there a way to ...
Mark H.'s user avatar
  • 401
2 votes
1 answer
173 views

Error on functions in queue: "Session does not exist in a console request."

I get the following error on multiple order mails from Craft Commerce. The error points out to the lines where a macro is called: Email template parse error for email “New order”. Order: “e35f244”. ...
chlsydkysr's user avatar
1 vote
1 answer
252 views

How to prevent Craft from injecting scripts in the page?

I have a website that resides behind a static cache. Today, I realised that some of the cached pages contain this bit of JavaScript at the end: <script type="text/javascript"> /*<![CDATA[*/ (...
nicbou's user avatar
  • 142
1 vote
1 answer
225 views

Painfully slow Feed Me import of User accounts

I'm aware of this thread on Feed Me slow performance, but I'm raising it as a separate thread in case there is anything particular about my circumstance that is pertinent. I'm running Craft 3.4.18 ...
Jonathan Schofield's user avatar
1 vote
1 answer
802 views

EVENT_BEFORE_SAVE_ELEMENT Saving element loop in task/queue

I'm calling EVENT_BEFORE_SAVE_ELEMENT to trigger a task that then updates the entry, but it's causing a loop? The event is triggered when a specific entry type is saved: Event::on( Elements::class,...
Tim Coysh's user avatar
1 vote
0 answers
210 views

Craft queue keeps sticking despite 1GB memory allocation

I keep seeing a Craft 3 site with queue sticking and clearing the cache doesn't clear it. I have been thru plugins fixed some errors and now it all comes down to same issues: PHP Fatal error: ...
joomkit's user avatar
  • 2,034
1 vote
2 answers
1k views

Craft queue not being processed, listen not running

I built a site on a dev server and the Craft queue worked in that with no extra setup needed. In fact I installed Async Queue Manager because Crafts way was too slow. They both worked fine. I moved ...
Laurence Cope's user avatar
3 votes
1 answer
2k views

When should I run queue/listen instead of queue/run?

Definitions from the documentation: queue/run: runs all the queued-up jobs queue/listen: listens to the queue and runs new jobs Example case: The runQueueAutomatically config option is set to false,...
Romain P.'s user avatar
  • 1,852
5 votes
2 answers
1k views

How to best design large queue jobs?

I have a plugin that captures data and stores it as an Element, similar to a log. There can be a lot of Elements created so there is also a way to purge those Elements from the DB. In most cases, the ...
Ben Parizek's user avatar
  • 13.5k
1 vote
1 answer
127 views

Craft Queues: Job Event

In Control Panel we can see the progress of a certain job. I would like to hook on events like "DONE" or "FAILED" and do certain things in Control Panel, e.g. reloading the page, or redirecting ...
Chris Angel's user avatar
4 votes
1 answer
569 views

How can I get tasks to complete when not logged in to the CP?

I've noticed that tasks only run when logged into the admin panel, is there anyway to avoid this? For some context: I have jobs scheduled on a cron to run every 30 minutes, when I log in it seems ...
Brett Moore's user avatar
2 votes
0 answers
170 views

Is the Craft Queue suitable for processing form submissions?

I am looking to queue my form submissions to be processed in the background. I want to be able to only keep user data in the system/database as long as required. This will mean keeping it to debug it ...
sanscheese's user avatar
1 vote
1 answer
359 views

What Might Be Causing This Serialization Error?

Craft Pro 3.0.7Notifications Plugin 1.0.6PHP 7.0 In trying to send notifications for new entries that have a checkbox field, we get this error in the logs: 2018-05-14 09:19:32 [192.168.10.1][1][-...
Steve Mock's user avatar