Giter Site home page Giter Site logo

SignalException: SIGTERM about clockwork HOT 4 OPEN

Shpigford avatar Shpigford commented on June 2, 2024
SignalException: SIGTERM

from clockwork.

Comments (4)

stevewilhelm avatar stevewilhelm commented on June 2, 2024

I am seeing the same behavior. I am also running on Heroku Cedar in a Sinatra app.

from clockwork.

calleo avatar calleo commented on June 2, 2024

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.

danabr75 avatar danabr75 commented on June 2, 2024

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.

typeoneerror avatar typeoneerror commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.