Comments (5)
@tomtaylor Thanks for opening this up. On the one hand, I don't know if there is anything that can be done to prevent timer messages from backing up when the system is sleeping. On the other hand, that number of messages seemed excessively high and it led me to check the producer module.
There were two timers running per producer, which would have effectively doubled the number of messages to handle and duplicated the polling queries. I've pushed up a fix to address this and will be releasing v0.6.0 shortly.
from oban.
I remember running into something like this with rabbitmq a while ago. I think I ended up turning off rabbitmq before I put my laptop to sleep :(
@sorentwo could you describe a little more what the problem is? I think I'd like to start a discussion on it in on the ElixirForum (on the general topic of sleeping and timers).
from oban.
could you describe a little more what the problem is? I think I'd like to start a discussion on it in on the ElixirForum (on the general topic of sleeping and timers).
Sure, I can explain to the best of my ability.
The producer uses :timer.send_interval/2
to repeatedly send the producer a poll
message every second. The :timer
module uses a separate process to manage the timer state and it will keep sending the producer the :poll
message regardless of whether the producer has handled the previous message. Apaprently, and here I'm hypothesizing, the timer
process either doesn't sleep when the laptop is suspended, or it tries to catch up rapidly when the laptop comes back from being suspended.
After researching the underlying issue a bit more (thanks for prompting me) I'm going to switch to using recursive send_after
instead of utilities through the :timer
module. That will be more efficient in overall and will also prevent this issue entirely.
from oban.
Oh nice, that makes sense as a fix, especially given how this loop is being used 👍
My laptop thanks you!
from oban.
Thanks @sorentwo!
from oban.
Related Issues (20)
- Bug inserting workers with decimal args HOT 3
- Oban Web: Unable to filter by meta.workflow_id HOT 2
- Support for Cockroach DB HOT 4
- Docs: Oban Pro wrong configuration instructions HOT 5
- Chain worker options ignored when passed through use HOT 1
- How to use Oban.Pro.Relay with Oban.Pro.Workers.Chunk HOT 2
- No config registered for [Oban, Oban.Met] instance HOT 9
- Can't update queue limits manually in Oban Web HOT 2
- ArgumentError when opening Oban Web before Oban executes a job and/or the jobs table is empty HOT 1
- Regression in `all_enqueued` handling of timestamp time zones HOT 3
- Oban Crontab : make sure that the module exist and is a job HOT 1
- Lazy Loading in Environments Results in Unknown Worker HOT 1
- Flooded with Oban errors in Sentry since upgrading (see description for versions) HOT 1
- Prevent Postgres notifier from crashing without connectivity HOT 1
- Replace pg_notify insert trigger with in-app notifications
- Starting postgres and sqlite correctly for development HOT 2
- Unstable test durations when using `Oban.Pro.Testing.run_workflow/2` HOT 1
- Test helpers don't work with SQLite3 unless prefix: false is explicitely used HOT 1
- ** (UndefinedFunctionError) function Ecto.Query.Builder.OrderBy.apply/2 is undefined or private HOT 3
- Global Partitioning Docs HOT 2
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 oban.