Custom Worker Thread pool in wildfly 26.1.1

472 views
Skip to first unread message

Yashaswini Adiga

unread,
May 22, 2023, 10:06:13 AM5/22/23
to WildFly
Hi All,

 I am trying to create a new worker thread pool. I want to have one specific application use a custom worker thread pool and rest to use default worker thread pool. 
This is how my standalone-full.xml configuration looks like 

 <subsystem xmlns="urn:jboss:domain:io:3.0">
            <worker name="default" io-threads="200" task-max-threads="200"/>
            <worker name="jobsubmit" io-threads="10" task-keepalive="60" task-max-threads="100" stack-size="0"/>
            <buffer-pool name="default"/>
    </subsystem>

I have placed jboss-web.xml in my applications (its a jar) META-INF directory.

<?xml version="1.0"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">

<jboss-web>
<executor-name>jobsubmit</executor-name>
</jboss-web>

Even after doing this I dont see a worker pool created in the web admin console.
It shows an internal error, but I dont see anything in the logs.

Am I missing any other configuration ?


Screenshot 2023-05-22 174838.jpg

Richard Opalka

unread,
May 22, 2023, 10:30:59 AM5/22/23
to Yashaswini Adiga, WildFly
Hello Yashaswini,

   stack-size="0" looks very suspicious to me. Did you check the server logs?

Richard

--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/582fb14e-6912-4228-b2dc-73d0211529e8n%40googlegroups.com.

Yashaswini Adiga

unread,
May 23, 2023, 4:20:30 AM5/23/23
to WildFly
Hi Richard,

  I do not see anything in the logs except that internal error popup when I bring up the web admin console.



Richard Opalka

unread,
May 23, 2023, 5:33:06 AM5/23/23
to Yashaswini Adiga, WildFly
Hello Yashaswini,

   The location for jboss-web.xml must always be the WEB-INF folder in your application regardless if it is a war or jar file.
Besides that your configuration files look good to me.

Richard

Antony Paul

unread,
May 24, 2023, 2:15:31 AM5/24/23
to WildFly
I too face error in admin console. There are other ways to verify thread pool is configured and is used by application.
1, Take thread dump using jstack or attach JConsole or VisualVM and look for your worker thread pool in the thread names listed.
2, In application log files in case log file contains thread name.
3, Set breakpoint in application code in servlet or one of spring controller and verify thread name in debugger like Eclipse, Idea.
4, To see configuration and runtime stats, use jboss cli. 

Anto

Reply all
Reply to author
Forward
0 new messages