Coder Social home page Coder Social logo

The value of the tomcat.threads.config.max metric is always -1, irrespective of the configured maximum number of threads about spring-boot HOT 5 CLOSED

lass9436 avatar lass9436 commented on August 24, 2024
The value of the tomcat.threads.config.max metric is always -1, irrespective of the configured maximum number of threads

from spring-boot.

Comments (5)

wilkinsona avatar wilkinsona commented on August 24, 2024 1

Yes, it's meaningless unless the executor is internal. What matters is the configuration of the endpoint's executor. If you look at this.executor in NioEndpoint, you should see it using the configured value for its maximum threads.

from spring-boot.

wilkinsona avatar wilkinsona commented on August 24, 2024

Thanks for the report. The setting is working as expected and Tomcat's thread pool has a max size of 400. The problem is that the metric is incorrect.

I believe that the metric's incorrect due to #36087. It has changed the executor that Tomcat uses so it's no longer internal to the endpoint. This means that it returns -1 for its max threads:

    public int getMaxThreads() {
        if (internalExecutor) {
            return maxThreads;
        } else {
            return -1;
        }
    }

from spring-boot.

lass9436 avatar lass9436 commented on August 24, 2024

Thank you for your kind reply. You actually said that Tomcat's maximum number of threads was set to 400, and the metric was incorrect.

3.3.0
2

But I debugged the part of code you mentioned, and maxThreads is 200. internalExecutor is false as you said. Is the value of 200 here meaningless?

3.2.6
326

It works normally in 3.2.6.

from spring-boot.

mhalbritter avatar mhalbritter commented on August 24, 2024

I've opened https://bz.apache.org/bugzilla/show_bug.cgi?id=69133 - if this is resolved, we can switch back to the default executor and set the queue size for #36087 via a normal setter.

from spring-boot.

mhalbritter avatar mhalbritter commented on August 24, 2024

Tomcat has added a setter to set the maximum queue size. When using this setter, this issue should go away. I've opened #41093 for that.

from spring-boot.

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.