You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2006/11/14 01:58:24 UTC

DO NOT REPLY [Bug 40967] New: - IIS connector does not auto-detect threads in IIS process to size connection_pool

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40967

           Summary: IIS connector does not auto-detect threads in IIS
                    process to size connection_pool
           Product: Tomcat 5
           Version: 5.0.0
          Platform: PC
        OS/Version: Windows Server 2003
            Status: NEW
          Severity: major
          Priority: P2
         Component: Native:JK
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: Tim.Whittington@orionhealth.com


The IIS connector currently hard codes the default connection_pool_size to 10,
which matches the PWS installed on NT Workstation and Win2k/XP Pro.

The Apache 2 connector in comparison auto detects the max threads per child
process on all platforms (although the docs don't indicate that this works for
mpm_winnt when it does).

Given that the docs are somewhat vague about the impacts of getting this wrong
(e.g. a silently dropped TCP connection with only a warn level error message to
indicate failure), this is a dangerous situation.

The attached patches:
 - Reports a failure to obtain an endpoint as an error (which it is) with the
recommendation that connection_pool_size be corrected.
 - Detects the current operating system and calculates the number of threads in
the IIS child process (this being the value of PoolThreadLimit, which is either
specified in the registry or calculated as 2*MB Ram on the machine capped at
256). The default connection_pool_size is then set to match the max number of
threads that IIS will allocate.
 - Document the new behaviour for the IIS connector, and clarify the docs for
Apache connectors, especially when used with mpm_winnt.

The PoolThreadLimit calculation (which applies to IIS 5 and 6) was obtained from
http://technet2.microsoft.com/WindowsServer/en/library/bd33bd8c-321a-4c28-8cb9-92ecc1b3b4381033.mspx?mfr=true
This has been tested on XP Pro and Windows 2003 Server Enterprise Edition.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40967] - IIS connector does not auto-detect threads in IIS process to size connection_pool

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40967


mturk@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Additional Comments From mturk@apache.org  2006-11-14 08:31 -------
Hi,

I have increased the default connection pool size to 250.
This value is the same as found in the Apache httpd.
On workstation the IIS itself will never create more then 10
threads, so the extra slots will not be used.

I would be OK with the patch that would depend on the
setup value for the read_registry_pool_thread_limit, but
not with determinig that by some guessing like memory size, etc..

So, you can modify your patch to use only the exact value,
and I'll commit that.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40967] - IIS connector does not auto-detect threads in IIS process to size connection_pool

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40967


rainer.jung@kippdata.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40967] - IIS connector does not auto-detect threads in IIS process to size connection_pool

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40967


Tim.Whittington@orionhealth.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |




------- Additional Comments From Tim.Whittington@orionhealth.com  2006-11-14 11:07 -------
The calculation in this patch is exactly what IIS calculates - e.g. check for
PoolThreadLimit in the registry, and calculate it as MIN(2*MB, 256) otherwise.
(This is described clearly in the linked technet article, and repeated
throughout the IIS docs, so it's by no means guesswork).

e.g. almost every IIS on a server in the world has 256 threads per process.
Setting the default to 250 will still leave a small window where the connection
pool can be overloaded by the web server.

I'd be fine with assuming that every server OS we'll encounter has a minimum of
128MB RAM, and hard coding the 256 as the default for server OSes (with the
registry check for override). I can modify the patch to do that if you agree.
Like you say, as long as high rather than low, it just won't use the extra slots.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40967] - IIS connector does not auto-detect threads in IIS process to size connection_pool

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40967





------- Additional Comments From rainer.jung@kippdata.de  2006-11-14 14:02 -------
My impression is, that these parameters are not well documented.

1) MaxPoolThreads is said to not include ISAPI threads, but as I understand it,
we are only interested in ISAPI threads

2) PoolThreadLimit is a system wide hard limit, but we need to know ISAPI
threads in one process

3) Other docs contain totally different rules:

http://download.microsoft.com/download/2/8/0/2800a518-7ac6-4aac-bd85-74d2c52e1ec6/tuning.doc

I find the situation very confusing.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40967] - IIS connector does not auto-detect threads in IIS process to size connection_pool

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40967





------- Additional Comments From Tim.Whittington@orionhealth.com  2006-11-13 16:59 -------
Created an attachment (id=19123)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19123&action=view)
Patch to automatically detect PoolThreadLimit for the IIS process and handle
endpoint allocation failures


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40967] - IIS connector does not auto-detect threads in IIS process to size connection_pool

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40967


mturk@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40967] - IIS connector does not auto-detect threads in IIS process to size connection_pool

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40967





------- Additional Comments From Tim.Whittington@orionhealth.com  2006-11-13 16:59 -------
Created an attachment (id=19124)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19124&action=view)
Updated docs for auto-sizing of connection_pool_size


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40967] - IIS connector does not auto-detect threads in IIS process to size connection_pool

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40967





------- Additional Comments From mturk@apache.org  2006-11-14 11:40 -------
Hmm,

I even think that 250 is too large.
It should be the default value of Tomcat maxThreads for AJP/1.3 connector,
and that is 40 for TC6 AJP APREndpoint, cca 150 for others.

With huge values for connection_pool_size the Tomcat will refuse
connections. So setting that to what IIS allows as max by guessing
the memory on the system is no go.

Like said, only if there is a way to get the configured IIS value,
that was configured by the hand, then OK, part of the patch can be
applied.

Please use develpers list if you wish to discuss the subject.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40967] - IIS connector does not auto-detect threads in IIS process to size connection_pool

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40967


rainer.jung@kippdata.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |LATER




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40967] - IIS connector does not auto-detect threads in IIS process to size connection_pool

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40967


Tim.Whittington@orionhealth.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19123|0                           |1
        is obsolete|                            |




------- Additional Comments From Tim.Whittington@orionhealth.com  2008-02-15 17:48 -------
Created an attachment (id=21539)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21539&action=view)
Updated IIS PoolThreadLimit detection patch

I've updated the patch to remove the memory limit detection - even if it's
correct there are very few servers in existence that it would matter for
anyway.
This patch reads PoolThreadLimit from the registry and defaults to 256/10 for
IIS/PWS variants respectively

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org