Comments (4)
I am seeing the same behavior. I am also running on Heroku Cedar in a Sinatra app.
from clockwork.
Did you guys solve this? We are seeing the same issue in Heroku. I am guessing Clockwork is not able to exit gracefully when the dyno restarts. But can it be solved somehow?
from clockwork.
I'm also experiencing the same issue, on Heroku in a Rails app.
Been using the gem for months, then 2 days ago, it started getting a SignalException on the sleep command. It's happened 4 times total so far.
from clockwork.
Here's what Heroku had to say
When Dynos are signal to shutdown, we first send SIGTERM, which your process should trap and perform any tasks required within 30 seconds before being forced to stop by the Dyno manager. I've had a quick look at your clock.rb, and it doesn't look like you're trapping any signals from the OS. If your application doesn't trap SIGTERM, it's likely that it will exit immediately, from whatever routine it's currently running, which looking at your stacktrace is during sleep (unsurprising for a clock process). You can gracefully shutdown by trapping the signal with something similar to:
# Trap `Kill `
Signal.trap("TERM") {
puts "\nShutting down gracefully..."
sleep 1
exit
}
from clockwork.
Related Issues (20)
- How to run clockwork on windows HOT 1
- no activity
- How run command in clockwork
- Memory usage
- Stop clockwork HOT 3
- Specify 20.minutes starting at... HOT 1
- What happens if there's no queuing? HOT 1
- New fork? HOT 3
- datetime wrong
- Task is not running if previous task in Process HOT 3
- Set 'start of the week' day
- measuring execution time for each task
- QUESTION: clockwork will skip execution of the task with the :at option
- [Typo] README.md resque-scehduler HOT 1
- Configuring exception handling HOT 1
- Numeric clash with ree-1.8.7-2010.02 / Rails 2.3.12 HOT 4
- Error starting clockwork in production HOT 1
- Cannot start with empty clock.rb
- All events triggered at startup HOT 1
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 clockwork.