Re: RemoteIP valve and multiple X-Forwarded-For headers

2010-12-10 Thread Jim Riggs
On Dec 10, 2010, at 7:59 AM, Mark Thomas wrote:

 Looks like a bug,
 
 Please add it to bugzilla, as Mark suggested.
 
 BTW, I think that the following change can fix it:
 (for current tc6.0.x, not tested!)
 
 I don't think so. I think the problem is further up on line 558:
 String[] remoteIpHeaderValue =
 commaDelimitedListToStringArray(request.getHeader(remoteIpHeader));
 
 I'm pretty sure that needs to be using request.getHeaders() but I
 haven't tested it either ;)

It does indeed need to be using the Enumeration from request.getHeaders() 
instead of the single value from getHeader().  I have started work on a patch, 
unless someone beats me to it...


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Connector Setting Problem in tomcat 6.0.29

2010-11-06 Thread Jim Riggs
On Nov 6, 2010, at 12:50 AM, rujin raj wrote:

 Now my server.xml file is like this.As you told i added
 executor=tomcatThreradPool as follows
 
 Executor name=tomcatThreadPool namePrefix=catalina-exec-
 maxThreads=1000 minSpareThreads=150/
 
 Connector port=8080 protocol=HTTP/1.1
  connectionTimeout=2
  executor=tomcatThreadPool
  maxThreads=1000
  enableLookups=false disableUploadTimeout=true
   redirectPort=8443 /
 Still the minSpareThreads is not taken into account.

I believe (if I heard it correctly), either Mark T. or Tim F. explained at 
ApacheCon this week that the minimum is not immediate.  It needs to build up to 
that level.  So, when you start Tomcat, you won't immediately fire up 150 
threads for the executor pool, but once = 150 threads are created in the 
process of serving requests, it will always keep a minimum of 150 for you.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Connector Setting Problem in tomcat 6.0.29

2010-11-06 Thread Jim Riggs
On Nov 6, 2010, at 2:17 PM, Christopher Schultz wrote:

 I believe (if I heard it correctly), either Mark T. or Tim F.
 explained at ApacheCon this week that the minimum is not immediate.
 It needs to build up to that level.  So, when you start Tomcat, you
 won't immediately fire up 150 threads for the executor pool, but once
 = 150 threads are created in the process of serving requests, it
 will always keep a minimum of 150 for you.
 
 If that's the case, I find that surprising. I always like to avoid
 violating the principle of least surprise. minSpareThreads as a name
 implies to me that those spares are /always/ available, even immediately
 after startup.

Chris -

If you look in org.apache.catalina.core.StandardThreadExecutor, you will see 
that it is using a ThreadPoolExecutor.  setMinSpareThreads() calls 
setCorePoolSize() in the ThreadPoolExecutor.  If you read the javadoc for 
ThreadPoolExecutor, specifically the subsections labeled Core and maximum pool 
sizes and On-demand construction, you will see that the threads are created 
on demand unless you use prestartCoreThread()/prestartAllCoreThreads(), which 
Tomcat does not.

So, although it may seem surprising or even counterintuitive, all 150 will not 
be fired up on startup.  Perhaps we could add a separate attribute on the 
Executor (e.g. startThreads)?  Then Tomcat would have a paradigm similar to 
httpd's Start(Servers|Threads) and MinSpare(Servers|Threads).  Any interest in 
such an attribute?  It would be fairly simple to roll a patch for it...


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Connector Setting Problem in tomcat 6.0.29

2010-11-05 Thread Jim Riggs
executor=executor_name, so in your case:

executor=tomcatThreadPool

This is shown in the default/sample server.xml under the comment

!-- A Connector using the shared thread pool--


On Nov 5, 2010, at 9:49 AM, rujin raj wrote:

 Please how to add the executor attribute in connector
 
 Executor=enable or true
 
 Is it like this:
 Connector port=8080 protocol=HTTP/1.1
connectionTimeout=2
  Executor=enable or true
  maxThreads=1000
enableLookups=false disableUploadTimeout=true
   redirectPort=8443 /
 
 
 Thanks for helping me upto this level.I am trying this from last one week.
 
 Regards
 rujin
 
 On 5 November 2010 18:37, Caldarale, Charles R
 chuck.caldar...@unisys.comwrote:
 
 From: rujin raj [mailto:rujin...@gmail.com]
 Subject: Re: Connector Setting Problem in tomcat 6.0.29
 
 I tried a lot. I am not able to point out the problem.Herewith
 i attached my server.xml file..
 
 When posting long XML files, please strip out the comments, so we don't
 have to wade through the junk.
 
Executor name=tomcatThreadPool namePrefix=catalina-exec-
 maxThreads=1000 minSpareThreads=150/
 
 You finally have an Executor configured; that's good.
 
Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   maxThreads=1000
   enableLookups=false disableUploadTimeout=true
   redirectPort=8443 /
 
 You failed to specify the executor attribute in the Connector, so the
 Connector will use its own thread pool, not the Executor.
 
 - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org