-
1. Re: Increase the "Maximum number of threads created"
spolti Nov 5, 2012 1:21 PM (in response to pcanvas)Hi bro.
Include the maxthred parameter in the jbossweb.sar/server.xml (jboss 5+)
like bellow:
<!-- A HTTP/1.1 Connector on port 8080 --> <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}" connectionTimeout="20000" redirectPort="8443" maxThreads="300" /> Rgards!
-
2. Re: Increase the "Maximum number of threads created"
erasmomarciano Nov 6, 2012 4:30 AM (in response to spolti)In Jboss 7.x there ins't more jbossweb.sar/server.xml.
You have do this modify in the file standalone.xml or in the file the yoour start (-server-config=)
<!-- A HTTP/1.1 Connector on port 8080 --> <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}" connectionTimeout="20000" redirectPort="8443" maxThreads="300" /> -
3. Re: Increase the "Maximum number of threads created"
wdfink Nov 6, 2012 5:38 AM (in response to spolti)The configuration is the <subsystem xmlns="urn:jboss:domain:web:1.2" ...
but I did not found properties for connectionTimeout, maxThreads or thread-pools within the schema (docs/schema/jboss-as-web*)
-
4. Re: Increase the "Maximum number of threads created"
rhusar Nov 6, 2012 5:50 AM (in response to pcanvas) -
5. Re: Increase the "Maximum number of threads created"
erasmomarciano Nov 7, 2012 5:04 AM (in response to wdfink)Sorry
You can configure also this tag
01.
<
subsystem
xmlns
=
"urn:jboss:domain:threads:1.0"
>
02.
<
bounded-queue-thread-pool
name
=
"http-executor"
03.
blocking
=
"true"
>
04.
<
core-threads
count
=
"10"
per-cpu
=
"20"
/>
05.
<
queue-length
count
=
"10"
per-cpu
=
"20"
/>
06.
<
max-threads
count
=
"10"
per-cpu
=
"20"
/>
07.
<
keepalive-time
time
=
"10"
unit
=
"seconds"
/>
08.
</
bounded-queue-thread-pool
>
09.
</
subsystem
If you are increasing the thread count too much, you will:
• Consume a good chunk of memory
• Your system will spend too much time-context switching
-
6. Re: Increase the "Maximum number of threads created"
kazoo Jan 11, 2013 4:34 AM (in response to erasmomarciano) -
7. Re: Increase the "Maximum number of threads created"
rhusar Jan 24, 2013 1:14 PM (in response to kazoo)It is what you specified in the max-connections. So it will be 200. When you get over the limit, you will get a message like this:
19:10:41,751 INFO [org.apache.tomcat.util.net.JIoEndpoint] (http--127.0.0.1-8080-Acceptor-0) Maximum number of threads (200) created for connector with address /127.0.0.1 and port 8080
You can test these things with apache benchmark tool (http://httpd.apache.org/docs/2.2/programs/ab.html) or any other similar load driver tool.
If you want more control over the threads, use the threading subsystem as explained in the post above (https://community.jboss.org/message/775298#775298).
Rado
-
8. Re: Increase the "Maximum number of threads created"
leysmi Apr 17, 2013 4:24 PM (in response to erasmomarciano)If i place this in my standalone.xml I get an error when starting the server. Does this need to go under a particular place in standalone.xml? under a subsystem perhaps? I really just want to increase the connectionTimeout from, what i believe is the defaul,t 60 seconds to 120 seconds. Would you happen know how to do this?
<!-- A HTTP/1.1 Connector on port 8080 --> <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}" connectionTimeout="20000" redirectPort="8443" maxThreads="300" /> -
9. Re: Increase the "Maximum number of threads created"
rhusar Apr 26, 2013 7:29 AM (in response to leysmi)What you posted is pre-AS 7 configuration which uses native configuration format (ie. of JBoss Web / Tomcat). See https://community.jboss.org/message/775021#775021 for how to do this on AS7.