In software, the term worker usually describes a long-running process being executed in a separate thread from an application's main thread of execution. Consider [tag:web-worker] for javascript.
Questions tagged [worker]
1272 questions
178
votes
32 answers
nginx.service failed because the control process exited
nginx.service failed because the control process exited
$ systemctl status nginx.service
nginx.service - Startup script for nginx service
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed…

daliborsb
- 1,781
- 2
- 10
- 4
44
votes
1 answer
multiple worker/web processes on a single heroku app
Is there some way to configure multiple worker and/or web processes to run in the single Heroku app container? Or does this have to be broken up into multiple Heroku apps?
For example:
worker: node capture.js
worker: node process.js
worker: node…

tobius
- 825
- 1
- 8
- 10
43
votes
4 answers
What are the consequences of disabling gossip, mingle and heartbeat for celery workers?
What are the implications of disabling gossip, mingle, and heartbeat on my celery workers?
In order to reduce the number of messages sent to CloudAMQP to stay within the free plan, I decided to follow these recommendations. I therefore used the…

nbeuchat
- 6,575
- 5
- 36
- 50
28
votes
1 answer
Starting multiple upstart instances automatically
We use PHP gearman workers to run various tasks in parallel. Everything works just fine, and I have silly little shell script to spin them up when I want them. Being a programmer (and therefore lazy), I wanted to see if I could spin these up via…

mkgrunder
- 941
- 1
- 7
- 13
24
votes
4 answers
What is the appropriate number of Gunicorn workers for each Amazon Instance Type?
I'm currently trying to figure out what the appropriate number of workers is for each Amazon Instance Type. I used to run one Gunicorn worker, however that proved to be quite slow.
Many developers are currently using this formula to gauge how many…

deadlock
- 7,048
- 14
- 67
- 115
22
votes
4 answers
Cannot find module 'worker_threads' error in production
I created a node js project that utilizes worker threads. The code works fine when I run npm start in VS Code. But when build and copied in Ubuntu server, it show "Cannot find module 'worker_threads'".
Is there additional configuration that must be…

Florante Reguis
- 221
- 1
- 2
- 3
22
votes
4 answers
Resolving imports using webpack's worker-loader in Jest tests
I'm writing a Jest test and am having trouble resolving this import which uses webpack's worker-loader
import ImageInfoWorker from 'worker-loader?name=image_info!@WORKERS/image-info';
I have some other aliases which are resolving properly in my…

wuliwong
- 4,238
- 9
- 41
- 69
22
votes
1 answer
Gunicorn with multiple workers: Is there an easy way to execute certain code only once?
If I start gunicorn with -w 4 with an app with the content
print 'hello'
it will print four times 'hello'. Is there some way to coordinate this in such a way that only one 'hello' is printed? I want to do some cleanup on start which I'd like to be…

ben
- 5,671
- 4
- 27
- 55
17
votes
2 answers
Service Worker : How to handle a 302 redirect response
I installed a service worker on my application, it gets installed well, activated well, and the caching is ok too.
But when the caching is done when I click on a page that is a 302, it tells me:
The FetchEvent for "http://localhost:8000/form/"…

Loann.M
- 170
- 1
- 1
- 7
16
votes
4 answers
Worker pools and multi-tenant queues with RabbitMQ
I work on a web application that is a multi-tenant cloud based application (lots of clients, each with their own separate "environment", but all on shared sets of hardware) and we're introducing the ability for a user to batch up work for later…

bakasan
- 2,262
- 2
- 26
- 33
16
votes
2 answers
How does Celery work?
I have recently started working on distributed computing for increasing the computation speed. I opted for Celery. However, I am not very familiar with some terms. So, I have several related questions.
From the Celery docs:
What's a Task…

jeldikk
- 353
- 2
- 12
16
votes
2 answers
How to configure Apache Spark random worker ports for tight firewalls?
I am using Apache Spark to run machine learning algorithms and other big data tasks. Previously, I was using spark cluster standalone mode running spark master and worker on the same machine. Now, I added multiple worker machines and due to a tight…

Isma Khan
- 161
- 1
- 1
- 6
16
votes
4 answers
How to close Smtp connection in SwiftMailer
I use SwiftMailer to send emails from a gearman worker process. I'm using the Swift_SmtpTransport class to send emails.
The problem is that if this worker process stays idle for sometime, the SwiftMailer smtp connection times out. Now when the next…

Nands
- 1,541
- 2
- 20
- 33
15
votes
1 answer
Amazon SQS how to control the number of retries
I am configuring a beanstalk worker environment to deal with periodic tasks
When the requested URL is not responding with status 200 Elastic Beanstalk will put the task again in the queue.
How can I configure the number or retries?
I know the…

fguillen
- 36,125
- 23
- 149
- 210
15
votes
2 answers
multiple methods per sidekiq worker
I don't get it.
Per Sidekiq documentation, each worker (mine is called FeedWorker) can only contain one method called perform. Well, what if I want to run mulitple methods through the same worker?
For instance, my FeedWorker (you guessed it, it…

Laurent
- 1,554
- 19
- 42