Giter Site home page Giter Site logo

Comments (4)

GBIDEV avatar GBIDEV commented on July 26, 2024

This is more likely a Heroku issue you need to bring up with Heroku Support. They may have better logs to identify the issue. Maybe start a Stack Overflow thread as well to get a wider response from the online community.

Depending on your plan with Heroku, you may be able to get them to assist with the restart of the dyno or you can create your own trigger to restart dynos daily as depending on your plan, they may have moved your DB during that period which caused the issue. I have experienced this before and as we were on a Hobby plan, they did not help us, so we added our own restart task daily so that we work on our timezones and not theirs. (Add Heroku Schedular and add a task "heroku ps:restart --app xxxxx")

rack-timeout threw the error, Rack::Timeout::RequestTimeoutException:, which confirms it caught it, but it could be your worker thread or any other puma or background task kept on retrying or attempting to complete the task but due to DB connectivity could not commit the transaction or query.

from rack-timeout.

dentarg avatar dentarg commented on July 26, 2024

@collimarco Please consider the options that have been suggested in #49 ( statement_timeout, RACK_TIMEOUT_TERM_ON_TIMEOUT)

from rack-timeout.

mtsmfm avatar mtsmfm commented on July 26, 2024

Without term on timeout, not only connections but also almost every code can be broken completely.
I described the detail in #169 and am proposing to set term on timeout by default.

from rack-timeout.

wuputah avatar wuputah commented on July 26, 2024

Is there any way to fix this inside this gem?

No, but you can use the "TERM on timeout" feature.

Should we report this to Rails / ActiveRecord? Why the connection was not healed automatically after some time?

It's been reported but it's not considered something they can fix. You can opt out of using prepared statements (and this is actually recommended by Heroku to turn this off) which does avoid this particular issue but you can still run into cases where the connection can enter a bad state.

Is there any way to tell Heroku to restart the dyno in this case (when it detects high rates of 500 errors)?

No -- there's infinite causes for a 500 and while restarting might work in some cases, the solution most apps use here would be to monitor the 500 rate to page a human to address the root cause of the 500s.

from rack-timeout.

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.