Comments (3)
Hm, I'm able to start workers on new nodes. What you're describing sounds like you might be inadvertently trying to start two sets of workers on the same node for the same queue. Are you sure you're running Honeydew.start_workers/3
on two separate nodes?
Did you check out the "global" example? I just tried it with two different "worker" nodes, seemed to work fine.
One thing you can't do is dynamically change the number of workers, on any one node, servicing a queue. Well, you can, but you have to stop the workers first, change the :num
argument to Honeydew.start_workers/3
, and start them up again. I'd love to implement real auto-scaling, but I think that's a can of worms when you get into it.
It's not documented (my bad), but the num
argument actually indicates the number of workers that should be started per queue node in the cluster. So if you specify num: 5
, and then have two queue nodes, you'll end up with ten workers running on each of your worker nodes. When a new queue node joins the cluster, you'll get another five. If a queue node becomes uncontactable, the number reduces by five, etc..
I haven't messed around too much with the particulars of adding new nodes dynamically to the Mnesia queue, I think there's a little bit of trickiness around that, @aaronrenner did a bit of work on that recently, he might be able to fill you in.
I'm more than happy to take a look at a minimal reproduction, if this doesn't help.
from honeydew.
@koudelka Thank you for your answer. You were spot-on. I realized that I had inadvertently started workers on the same node for the same queue.
Yeah, dynamically changing the number of workers would be great, but I understand that problem could get very complicated quickly. I figured that I could stop and start them again if I really need that.
Thanks for the heads up about the num
argument. I may mess around with adding new queue nodes dynamically, but I think I've come up with a good compromise for now.
I'll close this issue as there's no bug associated with it and these features would be too complicated to add for now. Thanks again for the quick answer.
from honeydew.
do let me know if you run into any other snags :)
from honeydew.
Related Issues (20)
- Clear an entire queue HOT 1
- Disabling clock freeze warning in test environment HOT 1
- Control retry time within job HOT 2
- Support Ecto.Adapters.MyXQL for MySQL HOT 6
- Mnesia as default queue not mentioned in start_queue/2 documentation HOT 1
- Custom queue makes Honeydew crashs by timeout HOT 4
- warning: function equal?/2 required by behaviour Ecto.Type
- How to rerun jobs if the system crashes? HOT 1
- pg2 scheduled for removal HOT 10
- How to cancel Jobs in Ecto Queue? HOT 1
- Doc links to code broken HOT 2
- Creates a behaviour for `Honeydew.Logger` module
- Unexpected behavior: bad_return application start failure using Mnesia outside of Honeydew HOT 5
- no match of right hand side value: [] HOT 2
- API for accessing in_progress jobs
- Redesigning API for concurrency
- Timeout error on application start HOT 1
- ErlangQueue doesn't respect delay_secs option HOT 1
- Shutdown hangs HOT 11
- Error when listing mnesia in mix extra_applications.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from honeydew.