11,240 questions
1
vote
3
answers
166
views
multiprocessing.JoinableQueue.empty() seems broken
[I am re-asking a question that was just closed. I have now including code that fails.]
Short version. I'm aware of the fact that multiprocess.Queue.empty() is unreliable. This makes sense to me. I ...
0
votes
0
answers
97
views
`multiprocessing.JoinableQueue.empty()` seems badly broken [closed]
Short version. I'm aware of the fact that multiprocess.Queue.empty() is unreliable. This makes sense to me. I understand that the actions of one thread may take a moment to be visible to another ...
1
vote
1
answer
109
views
Sometimes wrong output in Java queue simulation
Problem summary:
Each person in line has tickets[i] tickets to buy. Every second
The person at the front buys one ticket.
If they still need more tickets, they move to the end of the queue.
We need ...
0
votes
0
answers
74
views
Using Nitro with Sidequest, exporting functions to be used by external dependency?
I'm trying to use Nitro with Sidequest for queues.
Sidequest has to do some specific importing of the "job" files, as explained here:
https://docs.sidequestjs.com/jobs/manual-resolution#...
0
votes
1
answer
133
views
Laravel Queue Process Slow
I hope you’re all doing well. I’m reaching out because I’m facing an issue with my setup. I have a .NET application and a Laravel system integrated via API. The .NET application sends payloads to the ...
0
votes
0
answers
71
views
Laravel + RoadRunner + SQS — API workers blocked while publishing to SQS (70ms latency per request)
I’m running a high-concurrency Laravel application on an EC2 instance using RoadRunner (12 PHP workers).
Each incoming request simply publishes a message to AWS SQS — that’s all it does.
The problem: ...
1
vote
1
answer
58
views
Is circular linked list needed for "Circular" queue?/
I am learning about queue data structure in python. I learnt the implementation of a queue using list in python and the issue of memory wastage when we dequeue a few elements from the front. We use a ...
2
votes
4
answers
103
views
Postgresql stops using filter index
I have a very simple table for a task queue and keep taking records out one by one. If I add the filter_selector after filling/resetting the table, postgresql will use it and run super fast. But if I ...
1
vote
1
answer
161
views
Why does my queued job in Laravel 10 not execute after dispatch?
I have a fresh Laravel 10 app and I'm trying to test queues.
I created a job with php artisan make:job TestJob.
routes/web.php
Route::get('/test-job', function () {
\App\Jobs\TestJob::dispatch();
...
0
votes
1
answer
64
views
System verilog constraint for queues with fixed number of 6s
Can someone help me with system verilog constraint for the below requirement.1) Fixed queue size of 10 and has four 6s in it at random position.
I tried the below constraint to start with.
class ...
3
votes
1
answer
76
views
Celery task called inside another task always goes to default queue even with queue specified
I’m running Celery with Django and Celery Beat.
Celery Beat triggers an outer task every 30 minutes, and inside that task I enqueue another task per item.
Both tasks are decorated to use the same ...
2
votes
1
answer
106
views
supervisor creating logs file without the write permissions
We’re running some Laravel commands using Supervisor on our server. Each program writes to a log file in storage/logs.
The issue is that whenever a Supervisor rotates or creates a new log file, it’s ...
0
votes
0
answers
58
views
ASP.NET Core background service and queue processing behaves weird
I have a background service that periodically reads (not peeks) a message from an Azure storage queue and call an API to get values (that could returns 204 and will be retired), and then once gets ...
1
vote
1
answer
81
views
Best practice for handling high-volume post creation using queues in NestJS (Bull), and where to place charge logic?
I'm building a social app similar to Telegram using NestJS, PostgreSQL, and Prisma.
In one part of the app, I need to create a high volume of posts (e.g., thousands at once).
To prevent performance ...
2
votes
1
answer
163
views
This MPSC Queue (Multi Producer Single Consumer Queue) keeps on waiting in the consumer side sometimes although I have used CAS operations
This MPSC Queue (Multi Producer Single Consumer Queue) keeps on waiting in the consumer side sometimes although I have used CAS operations. I have added CAS operation for the enqueue function. Since I ...
1
vote
1
answer
125
views
dynamically resizing array in queue implementation [closed]
I'm trying to write a queue that will store strings. Using GDB I can tell that I make a memory allocation error in the function resizeQueue.
Here's the exact message:
Program received signal SIGTRAP, ...
-1
votes
2
answers
188
views
How do i comunicate between Threads Using Queues(janus)?? In Python [closed]
I'm building a multi-threaded system where:
One thread connects to a WebSocket, processes live kline data, and
queues symbol-interval keys for processing.
Another thread runs multiple async workers ...
0
votes
0
answers
31
views
Producer Successfully Sends Messages, but Some Are Lost Before Reaching Consumer (amqplib + RabbitMQ)
We are using amqplib in a TypeScript/Node.js application to publish messages to RabbitMQ using sendToQueue, and although it returns true and we’ve wrapped it with ConfirmChannel and await channel....
0
votes
4
answers
177
views
is there a way to empty a queue in O(1)?
I'm trying to understand the time complexities associated with standard data structures. For a queue, we know that enqueue() and dequeue() operations are typically O(1) in implementations like using a ...
0
votes
1
answer
44
views
How does Spotify store user queues?
I had an idea for a project (high schooler) that involved accessing an authorized user's Spotify current queue of tracks and modifying it. However, I wanted to ask whether this information would be ...
2
votes
1
answer
188
views
How to consume a Cloudflare Queue with NuxtHub (version 0.8.25)?
I'm working on a Nuxt project that uses NuxtHub and Cloudflare Queues.
✅ I can successfully publish messages to the queue like this:
const { cloudflare } = event.context;
console.log("Publishing ...
1
vote
0
answers
88
views
Why does cache-friendly design matter in lock-free queues if threads trash their cache anyway?
I'm trying to understand the practical value of "cache-friendly" design in lock-free queues. I often see people go to great lengths to pad structures, align data, and avoid false sharing — ...
2
votes
1
answer
76
views
Python multiprocessing.Queue strange behaviour
Hi I'm observing a strange behaviour with python multiprocessing Queue object.
My environment:
OS: Windows 10
python: 3.13.1
but I observed the same with:
OS: Windows 10
python: 3.12.7
and:
OS: ...
0
votes
2
answers
214
views
How do I safely put python signals into a queue?
I am working on a python3 script that handles signals (e.g. signal.SIGWINCH) by putting them in a queue. A separate thread puts user input into that same queue, which is all processed by my program's ...
0
votes
2
answers
99
views
Python Multiprocessing Pool Queue Works in Functional Code but not in OOP
I am learning multiprocessing in Python and am trying to incorporate a worker pool for managing downloads. I have deduced my queue issue down to something with OOP, but I don't know what it is. The ...
0
votes
0
answers
139
views
BullMQ: Flow parent job's 'failed' event not triggered when child jobs fail
I'm implementing a job flow using BullMQ (latest version) with NestJS, and I've encountered an issue with error handling in flow jobs.
The setup
I have a parent flow job and multiple child jobs. The ...
0
votes
1
answer
64
views
Items getting dropped while adding a list to queue
I have a system where I am trying to achieve a single point of action for writing to a database. For this I am using Queues, I fetch a record from a queue and add to a list. Once I have a required ...
2
votes
1
answer
276
views
Designing a Lock-Free Circular-Queue with CAS [Attempt: 2]
[Edit: Feel free to skip ahead to Attempt 2]
I have been trying to write a lock-free circular queue (ring buffer) for a multi-producer, multi-consumer (MPMC) use-case. Now before the haters of wheel-...
1
vote
1
answer
136
views
How to run Laravel queue on the production server? [closed]
I have used the queue job in my Laravel project to send emails to multiple users. My code is working perfectly on the local system, but on the production server, when I run the queue:work command, it ...
1
vote
0
answers
65
views
How to perform Geo-Replication in Apache Pulsar without creating duplicate messages?
I’m designing a multi-datacenter architecture using Apache Pulsar with geo-replication enabled.
Architecture Overview:
Apache Pulsar version: 4.0.2
Helm Chart version: pulsar-3.9.0
BookKeeper: 5 ...
0
votes
1
answer
69
views
Deadlock in Multiprocessing Queue
I am developing a program to simulate a P2P network using the multiprocessing package. Specifically, I have created a Node class that inherits from multiprocessing.Process and contains all the basic ...
0
votes
1
answer
148
views
How to handle contention in a lock-free, growable ring buffer?
I'm working on implementing a lock-free, growable ring buffer in Rust. The basic structure looks like this:
pub struct Queue<T> {
ptr: *mut T,
head: AtomicUsize,
tail: ...
1
vote
0
answers
152
views
c# NATS auth callout Authentication
I want to implement out callout authentication on NATS. I have created a console application that listens to the $SYS.REQ.USER.AUTH topic. Based on the received username and password, I generate a JWT ...
1
vote
2
answers
146
views
C++: Overloading = operator for a linked list queue? [closed]
I'm trying to figure out why this operator is giving me trouble. I actually allowed Visual Studio to build the function definition for me, so I'm not sure why it's upset at me. There's also an issue ...
0
votes
1
answer
88
views
queue does not detect database connection changes in laravel octane
Laravel ^11.0
Octane ^2.2
Server FrankenPHP
RabbitMQ
I have a backend using laravel octane, then I change the database connection ip. To get the new database data it has been detected. However, I ...
1
vote
0
answers
160
views
bullmq deduplicate job while keeping the last one in the queue
I have a bullMq queue (deploy_site) that takes around 20 seconds to finish. There should be no concurrent run per site, so basic deduplication was easy:
deployQueue.add({
id: siteId
},
{
...
-1
votes
1
answer
133
views
Lock on a Resource queue to ensure only one container access the Resource
I am planning to develop a Java application and deploy it in K8s containers where the minimum containers are 3.
My requirement is to maintain a common queue for the 3+ containers and run a scheduler ...
0
votes
0
answers
140
views
Queue Job tasks stuck in "pending" state in Docker Swarm with multiple nodes (Odoo 17)
🚨 Queue Job tasks stuck in "pending" state in Docker Swarm with multiple nodes (Odoo 17)
Module
queue_job
Describe the bug
In a Docker Swarm environment with three nodes, one Odoo instance, ...
1
vote
1
answer
106
views
What are the drawbacks of implementing dequeue using procedure int? [closed]
I'm trying to implement a queue and for dequeue I've purposely done with an int procedure. What would be possible drawbacks for using an int?
int dequeue(queue *q) {
int res = 0; // list not empty
...
1
vote
0
answers
83
views
Managing Worker Thread Wake-Up in C++: Separate vs. Shared Condition Variables?
I have a queue of worker thread IDs in C++, and a coordinator thread wakes each thread in order. The woken thread then interacts with the coordinator thread to perform some work. Once done, the ...
1
vote
0
answers
25
views
Livelock in tantrum Queues
I'm studying lock free MPMC queues, and I read some papers mainly about common practices and/or designs. I found myself reading about tantrum queues, that are lock free data structures that emulate an ...
0
votes
0
answers
44
views
multiple amazon sqs queues with laravel
I have setup two queues (calculator-webhook-queue & offers-queue) on Amazon SQS with the following code:-
In .env file
QUEUE_CONNECTION=sqs
AWS_DEFAULT_REGION=us-east-1
AWS_ACCESS_KEY_ID=*******
...
0
votes
1
answer
103
views
How to Reactively read a Queue with Dynamic Delay using Mutiny in Java?
Currently I have a service which read events from a queue in SQS and process the found messages. I have a concurrency with 2 threads reading at the same time the queue to process the messages. The ...
0
votes
2
answers
100
views
Laravel Queue Database Connection Slow Job Retrieval
I'm using Laravel's database queue connection to process frequent robot heartbeat data. Each second, robots send data that the Laravel server processes by updating the respective robot entries. The ...
1
vote
1
answer
42
views
'IterQueue' object has no attribute 'not_full'
I have a class called "IterQueue which is an iter queue:
IterQueue.py
from multiprocessing import Process, Queue, Pool
import queue
class IterQueue(queue.Queue):
def __init__(self):
self....
3
votes
1
answer
136
views
Is there a way to stop a memory leak with a queue and a custom struct with a character array?
I am creating a custom object Message, and then appending it to a queue. This will call the copy constructor; however, the addresses after a memmove() don't seem to match like I would expect them to.
...
0
votes
0
answers
214
views
BullMQ Job Not Removed from Queue After Calling job.remove()
I’m prototyping a project using BullMQ and Redis, and so far, everything seems to be working fine. Jobs are being added to the queue successfully. However, when I process the jobs using a worker and ...
0
votes
0
answers
26
views
php artisan queue:work is not working, I don't know why?
I tried using the php artisan queue:work command, but I didn't get any results. There were no error messages or notifications about any issues—it just seems to freeze. As soon as I run the command, ...
0
votes
1
answer
56
views
In laravel how do I ran a job on one queue only?
I have an app in vapor and I have a long running job lets say UpdateSomething and I want this job to be on one queue only, I don't want it to run concurrently.
class UpdateSomething implements ...
0
votes
1
answer
95
views
How to Implement Queue with Custom Database in Multitenant Architecture?
I’m working on a multitenant application in Laravel where the database connection is determined dynamically based on the subdomain of the request. For example:
spain.example.com uses the spain_db.
...