Git Product home page Git Product logo

Comments (2)

bensheldon avatar bensheldon commented on June 11, 2024

Yep, those are inconsistent. The simplest and most up-to-date correction would be 2 + ENV.fetch("GOOD_JOB_MAX_THREADS", 5).to_i

That's also a little misleading because GOOD_JOB_MAX_THREADS isn't the total upperbound of threads, but more like "the default number of threads for a a configured pool" i.e. if you're using multiple pools (like default;other with the semicolon) that will be GOOD_JOB_MAX_THREADS * number-of-pools.

There's now a calculator:

# Returns the maximum number of threads GoodJob might consume
# @param warn [Boolean] whether to print a warning when over the limit
# @return [Integer]
def self.total_estimated_threads(warn: false)

Lastly, it's really not necessary to be precise with this number so long as the the number is larger than the maximum total threads. It would be safest to simply set this to 50 and not worry about it; the Active Record Database Connection Pool will never allocate more connections than it strictly needs. (I've heard rumors that Rails might even remove the pool size in the future because it's not very useful to configure)

from good_job.

yenshirak avatar yenshirak commented on June 11, 2024

Thanks for the clarification.

from good_job.

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.