users@glassfish.java.net

threadpool.max_threads_too_low warning when an AJP connector is enabled

From: <glassfish_at_javadesktop.org>
Date: Mon, 22 Mar 2010 10:06:56 PDT

Hi,

When a Glassfish v3 server starts up with the default settings and an AJP connector enabled, the following message appears in the server.log:

[#|2010-03-22T14:09:52.462+0100|WARNING|glassfishv3.0|org.apache.tomcat.util.threads.ThreadPool|_ThreadID=11;_ThreadName=Thread-2;|threadpool.max_threads_too_low|#]

Looking at the source of org.apache.tomcat.util.threads.ThreadPool.java, it would appear to be because:

    /*
     * Default values ...
     */
    public static final int MAX_THREADS = 200;
    public static final int MAX_THREADS_MIN = 10;
....
        if(maxThreads &lt;= 0) {
            maxThreads = MAX_THREADS;
        } else if (maxThreads &lt; MAX_THREADS_MIN) {
            log.warning(sm.getString("threadpool.max_threads_too_low",
                                     Integer.valueOf(maxThreads),
                                     Integer.valueOf(MAX_THREADS_MIN)));
            maxThreads = MAX_THREADS_MIN;
        }

And the max threads default for the http-thread-pool is 5. If I change this number to 10, the warning goes away.

Is this a bug, and what are the implications of ignoring the warning versus raising the max to 10?

Thanks.

Richard
[Message sent by forum member 'richardss']

http://forums.java.net/jive/thread.jspa?messageID=393158