spring boot 中默认最大线程连接数,线程池数配置查看
本文为博主原创,转载请注明出处:
可以查看 AbstractEndpoint 源码中的常量的定义:
public abstract class AbstractEndpoint<S, U> { protected static final StringManager sm = StringManager.getManager(AbstractEndpoint.class); protected volatile boolean running = false; protected volatile boolean paused = false; protected volatile boolean internalExecutor = true; private volatile LimitLatch connectionLimitLatch = null; protected final SocketProperties socketProperties = new SocketProperties(); protected Acceptor<U> acceptor; protected SynchronizedStack<SocketProcessorBase<S>> processorCache; private ObjectName oname = null; protected Map<U, SocketWrapperBase<S>> connections = new ConcurrentHashMap(); private String defaultSSLHostConfigName = "_default_"; protected ConcurrentMap<String, SSLHostConfig> sslHostConfigs = new ConcurrentHashMap(); private boolean useSendfile = true; private long executorTerminationTimeoutMillis = 5000L; protected int acceptorThreadCount = 1; protected int acceptorThreadPriority = 5; private int maxConnections = 8192; private Executor executor = null; private ScheduledExecutorService utilityExecutor = null; private int port = -1; private int portOffset = 0; private InetAddress address; private int acceptCount = 100; private boolean bindOnInit = true; private volatile AbstractEndpoint.BindState bindState; private Integer keepAliveTimeout; private boolean SSLEnabled; private int minSpareThreads; private int maxThreads; protected int threadPriority; private int maxKeepAliveRequests; private String name; private String domain; private boolean daemon; private boolean useAsyncIO; protected final List<String> negotiableProtocols; private AbstractEndpoint.Handler<S> handler; protected HashMap<String, Object> attributes; public AbstractEndpoint() { this.bindState = AbstractEndpoint.BindState.UNBOUND; this.keepAliveTimeout = null; this.SSLEnabled = false; this.minSpareThreads = 10; this.maxThreads = 200; this.threadPriority = 5; this.maxKeepAliveRequests = 100; this.name = "TP"; this.daemon = true; this.useAsyncIO = true; this.negotiableProtocols = new ArrayList(); this.handler = null; this.attributes = new HashMap(); }
https://blog.csdn.net/seanxwq/article/details/104055743/
https://www.cnblogs.com/duanxz/p/6084494.html