Bug 1203510
Summary: | [GSS](6.4.z) Http11NioProtocol connector does not count currentThreadCount and currentThreadsBusy | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Osamu Nagano <onagano> | ||||||
Component: | Web | Assignee: | Enrique Gonzalez Martinez <egonzale> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Radim Hatlapatka <rhatlapa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 6.3.1 | CC: | bmaxwell, egonzale, ihradek, jtruhlar, msochure, rmaucher | ||||||
Target Milestone: | CR1 | ||||||||
Target Release: | EAP 6.4.11 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2017-01-17 13:10:51 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 1316573, 1361648 | ||||||||
Attachments: |
|
Description
Osamu Nagano
2015-03-19 03:05:24 UTC
Created attachment 1003572 [details]
sample.war
I cannot implement this, so dev-. NIO2 has to use an executor rather than the old internal pool, which won't provide statistics. Instead, if an executor is configured in AS and set on the connector, then its statistics should be available. Custom executor can be configured as follows: ~~~ /subsystem=threads/blocking-bounded-queue-thread-pool=nio2-connector:add(core-threads=10,max-threads=20,queue-length=10) /subsystem=web/connector=http:write-attribute(name=executor,value=nio2-connector) ~~~ But threads subsystem has another bug, Bug 1021911, where active-count is missing. ~~~ [standalone@localhost:9999 /] ls -l /subsystem=threads/blocking-bounded-queue-thread-pool=nio2-connector ATTRIBUTE VALUE TYPE allow-core-timeout false BOOLEAN core-threads 10 INT current-thread-count 2 INT keepalive-time undefined OBJECT largest-thread-count 2 INT max-threads 20 INT name nio2-connector STRING queue-length 10 INT queue-size 0 INT rejected-count 0 INT thread-factory undefined STRING ~~~ According to JBTHR-25, it will be not fixed because WFLY-462 is going to eliminate threads subsystem. So workaround of APR connector should be adopted. Hi @Remy I think it's possible to provide the stats with the default case. There is a workaround based on two different calls in the ThreadPoolExecutor getActiveCount and getPoolSize. By default NioEndpoint creates a ThreadPoolExecutor during init call so if the executor is an instance of ThreadPoolExecutor, at least we can provide the stats. i.e (NioEndpoint): public int getCurrentThreadCount() { return (this.executor instanceof ThreadPoolExecutor) ? ((ThreadPoolExecutor) this.executor).getPoolSize() : getCurThreads(); } public int getCurrentThreadsBusy() { return (this.executor instanceof ThreadPoolExecutor) ? ((ThreadPoolExecutor) this.executor).getActiveCount() : getCurThreadsBusy(); } Could this be ok Remy ? I suppose it doesn't hurt. Created attachment 1023190 [details]
patch jboss 7.5.x
PR sent
patch is up. This should be on POST. Verified with EAP 6.4.11.CP.CR1; Retroactively bulk-closing issues from released EAP 6.4 cummulative patches. |