Comments (14)
Good point. I may have to review Exceptional Ruby for library behavior recommendations - if it just ate exceptions, you'd have unprocessed jobs backing up for no apparent reason.
At the moment, the scale happens before the yield, so the job won't be enqueued
from autoscaler.
hm, yikes, that seems problematic. seems like some of my jobs got through and some didn't. can't really make sense of it.
anyway, i figure it's better to have the jobs in the queue and no workers to process them than no jobs and no workers, knowwhatimean?
from autoscaler.
How's this?
from autoscaler.
from autoscaler.
Great, Heroku API is down today! Deploying w/ the github version to see what happens... Who would've thought we'd get a chance to test so soon.
EDIT: Sadly, no dice, can't deploy either...
from autoscaler.
I thought that heroku's tools used the API as well, although I had some hope that deploy was significant separate service in it's own right :-(
from autoscaler.
Any input on how to implement a custom handler correctly? I'm doing the following, but maybe there's a simpler/better way:
exception_handler = ->(exception) do
Honeybadger.notify(
error_class: exception.class,
error_message: exception.message
)
end
Sidekiq.configure_server do |config|
config.redis = sidekiq_redis if sidekiq_redis
config.server_middleware do |chain|
scaler = Autoscaler::HerokuScaler.new
scaler.exception_handler = exception_handler
chain.add(Autoscaler::Sidekiq::Server, scaler, 60)
end
end
from autoscaler.
That's about what I intended.
from autoscaler.
I've never been so excited to see Heroku API errors! Exceptions the last 15 minutes have been getting logged but jobs are still queuing. Yay!
Thank you, again.
from autoscaler.
How do you feel about rescuing Exception
like sidekiq does rather than limiting it to Excon? I imagine other stuff could go wrong as well that we aren't thinking of ;)
https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/processor.rb#L54
from autoscaler.
Mostly blanket exception catching makes me nervous about masking errors.
Sidekiq has a slightly different domain - it has to wrap arbitrary user code, and then respond appropriately (such as retry) One reason not to catch all exceptions is to let Sidekiq continue it's usual error handling.
from autoscaler.
True, but we wouldn't catch those, right? I don't think they would bubble up to Autoscaler... I'm in the same camp as you, but in situations like this where queuing is more important than performing, it just seems to make sense.
from autoscaler.
Another day, another Heroku API failure. Here's the latest exception that's now bubbling up to my app and causing sidekiq not to enqueue: Heroku::API::Errors::ErrorWithResponse: Expected(200) <=> Actual(503 Service Unavailable)
from autoscaler.
New idea: is it possible to handle the scaling after sidekiq has successfully enqueued the job? That way no matter what happens with autoscaler, we know jobs won't be lost...
from autoscaler.
Related Issues (20)
- Handle heroku api downtimes HOT 1
- Project requires more active maintainer HOT 3
- 403 Forbidden when scaling worker HOT 1
- support for Sidekiq 3.0.0 HOT 4
- undefined method `async' for nil:NilClass HOT 2
- Autoscaling multiple workers HOT 1
- support for Sidekiq 3.1 and 3.2 HOT 2
- Upgrade to platform-api HOT 2
- time to release a new version? HOT 15
- Linear scaling strategy with long running jobs HOT 3
- Handling multiple queues with a single worker dyno HOT 4
- How to use LinearScalingStrategy? HOT 1
- Project maintainer should also be a user HOT 3
- Error when scaling down - Unable to create thread HOT 10
- don't want to use set_initial_workers HOT 5
- Sidekiq 5 support? HOT 2
- Heroku platform API error HOT 3
- Rename ENV vars HOT 4
- Autoscaler is passaing Incorrect Authentication "type" param to platform-api HOT 4
- ThreadError: can't alloc thread HOT 6
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 autoscaler.