Re: Max Threads - Worker Threads clarification

2012-10-24 Thread vivek aggarwal


Chris, 
I have following understanding with regards to your trailing mail comments ,pls 
do correct me if  that's not correct :- 
In workers.properties (Apache end) we have directive called 
connection_pool_size which is number of those connection that each apache web 
server child process can made to the backend (Tomcat).So does that mean i 
should keep this connection_pool_size value in sync with threads configured 
for a given connector (http) in server.xml (Tomcat) in order to avoid thread 
exhaustion limit
 
Is there recommendation you have with respect to Apache-Tomcat communication , 
that people like me ( naive) should keep in mind in order to avoid any 
connection time out/thread exhaustion/ response time out erorrs ?? 
 
thanks for your help as usual,
Vicky
 


 From: Christopher Schultz ch...@christopherschultz.net
To: Tomcat Users List users@tomcat.apache.org 
Sent: Wednesday, 24 October 2012 7:17 PM
Subject: Re: Max Threads - Worker Threads clarification
  
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Charles,

On 10/24/12 8:29 AM, Charles Richard wrote:
 I do use load balancing on our production environment so I'll have
 to check out the parallel timeout you mention, I don't think I've
 read about this before.

You'll need those values to be the same (yet different: read the
documentation carefully) whether you are load-balancing or not.

 As far as Tomcat hanging, my apologies, I discovered late yesterday
 that it was Apache reaching its MaxClients limit and therefore
 Apache was my bottleneck.  After increasing the Apache parameters
 and looking at tomcat threads through VisualVM, this all looked a
 lot better.

If you are using a load-balancer just remember that Tomcat needs to be
able to handle N * M connections where N is the number of front-end
servers you have and M is the number of AJP connections configured
from each front-end server (which might just be the same as MaxClients).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org/
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCH8WEACgkQ9CaO5/Lv0PBvUgCeLRbhkrr6ZG20/rQ2w6jfCbGh
yRYAn0zhKeazO+ZCdlwVb4dMFbvBgXgU
=fqFb
-END PGP SIGNATURE-

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

SSl Query-- please help

2012-10-20 Thread vivek aggarwal
Hello All,
 
I need to setup the SSL over my tomcat ,which i am able to do it by generating 
Self signed certificate using Keytool
 
But when  i am redirecting the request form apache using mod_jk module its 
not working.
 
I am not sure how to make Apache  Tomcat work in SSL when using Mod_jk module 
as i need load balancing
 
Can someone please share the steps for doing ssl setup when apache is used 
along with Tomcat

Thanks
Vicky

Re: Tomcat 6.0 queries

2012-10-14 Thread vivek aggarwal
Thanks Mark for responding.. great piece of info.. Thanks again
 
vicky
 


 From: Mark Eggers its_toas...@yahoo.com
To: users@tomcat.apache.org 
Sent: Sunday, 14 October 2012 12:47 AM
Subject: Re: Tomcat 6.0 queries
  
On 10/13/2012 3:42 AM, vivek aggarwal wrote:
 Hello All,
 
 Can you guys please help in understanding my following concerns/queries :-
 
 1.  How can we configure the number of threads for managing simultaenous
 HTTP connection requests coming from Apache. Is there any connection time out 
 value
 we have at the tomcat side which we can configure ?

There is a lot of documentation. I'm going to make a few assumptions here. If 
they are not right, then my comments will not make a lot of sense.

I'm assuming that you're fronting one or more Tomcat servers with Apache HTTPD. 
I'm also assuming that you're using the AJP connector (mod_jk).

Managing the number of connections is done in server.xml when you configure the 
Connector. See the maxThreads attribute. There is an additional backlog 
attribute as well. So the total number of simultaneous connections would be 
maxThreads + backlog, with only maxThreads being serviced.

There is another way of managing the total number of threads with an Executor 
thread pool. I've not discussed that here.

Timeout values are in two places. There are two values in server.xml which 
govern how long a connection waits for a URI once it's open (connectionTimeout) 
and how long to wait for another request (keepAliveTimeout). Both are infinite 
by default.

You'll want those values to be in sync with your AJP configuration (normally 
found in workers.properties). In particular, pay attention to 
connection_pool_timeout.

Note that the connection_pool_timeout value is in seconds, while the 
keepAliveTimeout is in milliseconds.

Recent source versions of mod_jk have a very good example in the conf 
subdirectory of the distribution.

For more information, I suggest that you read:

http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
http://tomcat.apache.org/connectors-doc/reference/workers.html

 2. In tomcat how to check the number of  requests served at a particular
 moment or  the number of open connnections from tomcat side?/
 

JMX is probably your best bet here. This has been discussed several times on 
the mailing list. You also might find the following useful:

https://code.google.com/p/psi-probe/

 3.  for the ongoing connection request how does the tomcat manage the
 user sessions ,,, any configuration for the same do we have which we can tune 
 ??
 

Read the servlet specification. In particular, pay attention to the 
session-config and session-timeout elements in web.xml.

 Thanks for your help in advance,
 
 Vicky
 

. . . . just my two cents.
/mde/

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

Re: Tomcat 6.0 cluster query

2012-10-10 Thread vivek aggarwal
nk02.mls,
 
Can you help me in understand that the significance of port attribute in 
Receiver   Member Tag.
These need to be same ???
Does this need to be 4000 ??
 
  Receiver className=org.apache.catalina.tribes.transport.nio.NioReceiver
address=192.168.2.200
port=4000
autoBind=100
selectorTimeout=5000
maxThreads=6/

Member className=org.apache.catalina.tribes.membership.StaticMember
port=4000
host=192.168.2.200
domain=mydomain

uniqueId={192,168,2,200,0,0,0,0,0,0,0,0,0,0,0,0}/


Thanks
Vicky
 


 From: nk02.mls nk02@gmail.com
To: vicky007aggar...@yahoo.co.in 
Cc: Tomcat Users List users@tomcat.apache.org 
Sent: Wednesday, 10 October 2012 9:58 PM
Subject: Re: Tomcat 6.0  cluster query
  
Vicky,

From my memo inn 2010, I seemed to test that function by using following 
server.xml

But I've forgotten the meanings of each parameter...
Please check documents.

And I don't know whether this config works fine on current Tomcat 6.0.x..

-
?xml version='1.0' encoding='utf-8'?
Server port=8005 shutdown=SHUTDOWN
  !-- Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on / --
  Listener className=org.apache.catalina.core.JasperListener /
  Listener 
className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
  GlobalNamingResources
    Resource name=UserDatabase auth=Container 
type=org.apache.catalina.UserDatabase
              description=User database that can be updated and saved
              factory=org.apache.catalina.users.MemoryUserDatabaseFactory
              pathname=conf/tomcat-users.xml /
  /GlobalNamingResources
  Service name=Catalina
    Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 
redirectPort=8443 /
    Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /
    Engine name=Catalina defaultHost=localhost jvmRoute=lin-200
      Realm className=org.apache.catalina.realm.UserDatabaseRealm 
resourceName=UserDatabase/
      Host name=localhost  appBase=webapps unpackWARs=true 
autoDeploy=true
            xmlValidation=false xmlNamespaceAware=false

        Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster 
channelSendOptions=6 channelStartOptions=3

            Manager className=org.apache.catalina.ha.session.DeltaManager
                expireSessionsOnShutdown=false
                notifyListenersOnReplication=true/

            Channel className=org.apache.catalina.tribes.group.GroupChannel
                Receiver 
className=org.apache.catalina.tribes.transport.nio.NioReceiver
                    address=192.168.2.200
                    port=4000
                    autoBind=100
                    selectorTimeout=5000
                    maxThreads=6/

                Sender 
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
                    Transport

className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
                /Sender

                !--
                Interceptor

className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
                --
                Interceptor

className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/

                Interceptor 
className=org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor
                    Member 
className=org.apache.catalina.tribes.membership.StaticMember
                         port=4000
                         host=192.168.2.50
                         domain=mydomain

uniqueId={192,168,2,50,0,0,0,0,0,0,0,0,0,0,0,0}/
                    Member 
className=org.apache.catalina.tribes.membership.StaticMember
                         port=4000
                         host=192.168.2.100
                         domain=mydomain

uniqueId={192,168,2,100,0,0,0,0,0,0,0,0,0,0,0,0}/
                    Member 
className=org.apache.catalina.tribes.membership.StaticMember
                         port=4000
                         host=192.168.2.150
                         domain=mydomain

uniqueId={192,168,2,150,0,0,0,0,0,0,0,0,0,0,0,0}/
                    Member 
className=org.apache.catalina.tribes.membership.StaticMember
                         port=4000
                         host=192.168.2.200
                         domain=mydomain

uniqueId={192,168,2,200,0,0,0,0,0,0,0,0,0,0,0,0}/
                /Interceptor
            /Channel
            Valve className=org.apache.catalina.ha.tcp.ReplicationValve 
filter=/
            Valve 
className=org.apache.catalina.ha.session.JvmRouteBinderValve/

            ClusterListener

className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
            ClusterListener

className=org.apache.catalina.ha.session.ClusterSessionListener/
        

Re: Tomcat 6.0 cluster query

2012-10-10 Thread vivek aggarwal
nk02.mls,

Thanks for responding my silly queries.
 
But seriously i didnt understand what does th documentation states, its vague
 
I didnt understand the difference between port  autoBind.
 
port  The listen port for incoming data. The default 
value is 4000. To avoid port conflicts the receiver will 
automatically bind to a free port within the range of port = bindPort 
= port+autoBind So for example, if port is 4000, and autoBind is set 
to 10, then the receiver will open up a server socket on the first available 
port in the range 4000-4100.   
autoBind  Default value is 100. Use this value 
if you wish to automatically avoid port conflicts the cluster receiver will try 
to open a server socket on the port attribute port, and then work 
up autoBind number of times.   

Secondly if above Receiver port is for listenning cluster messages what does 
the Intercetor port will do... as mentioned below

Please it may be annoying but is it possible for you to understand the overall 
picture/flow of this tags to me which are used in Tomcat Static membership 
cluster

thanks a lot for your help 

   Interceptor 
className=org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor
    Member 
className=org.apache.catalina.tribes.membership.StaticMember
    port=4000
    host=192.168.2.50
    domain=mydomain
uniqueId={192,168,2,50,0,0,0,0,0,0,0,0,0,0,0,0}/


Vicky
 


 From: nk02.mls nk02@gmail.com
To: vivek aggarwal vicky007aggar...@yahoo.co.in 
Cc: Tomcat Users List users@tomcat.apache.org 
Sent: Wednesday, 10 October 2012 10:29 PM
Subject: Re: Tomcat 6.0  cluster query
  
Vicky,

The port of Receiver seems to be bound automatically.

http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-receiver.html

 The listen port for incoming data. The default value is 4000. To avoid 
port conflicts the receiver will automatically bind to a free port 
within the range of port = bindPort = port+autoBind So for example, if 
port is 4000, and autoBind is set to 10, then the receiver will open up 
a server socket on the first available port in the range 4000-4100. 

So, I don't think we need to set them same.


(2012/10/11 1:36), vivek aggarwal wrote:
 nk02.mls,

 Can you help me in understand that the significance of port attribute in 
 Receiver   Member Tag.
 These need to be same ???
 Does this need to be 4000 ??

    Receiver className=org.apache.catalina.tribes.transport.nio.NioReceiver
 address=192.168.2.200
 port=4000
 autoBind=100
 selectorTimeout=5000
 maxThreads=6/

 Member className=org.apache.catalina.tribes.membership.StaticMember
 port=4000
 host=192.168.2.200
 domain=mydomain

 uniqueId={192,168,2,200,0,0,0,0,0,0,0,0,0,0,0,0}/


 Thanks
 Vicky


 
   From: nk02.mls nk02@gmail.com
 To: vicky007aggar...@yahoo.co.in
 Cc: Tomcat Users List users@tomcat.apache.org
 Sent: Wednesday, 10 October 2012 9:58 PM
 Subject: Re: Tomcat 6.0  cluster query

 Vicky,

  From my memo inn 2010, I seemed to test that function by using following 
server.xml

 But I've forgotten the meanings of each parameter...
 Please check documents.

 And I don't know whether this config works fine on current Tomcat 6.0.x..

 -
 ?xml version='1.0' encoding='utf-8'?
 Server port=8005 shutdown=SHUTDOWN
    !-- Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on / --
    Listener className=org.apache.catalina.core.JasperListener /
    Listener 
className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
    Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
    Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
    GlobalNamingResources
      Resource name=UserDatabase auth=Container 
type=org.apache.catalina.UserDatabase
                description=User database that can be updated and saved
                factory=org.apache.catalina.users.MemoryUserDatabaseFactory
                pathname=conf/tomcat-users.xml /
    /GlobalNamingResources
    Service name=Catalina
      Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 
redirectPort=8443 /
      Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /
      Engine name=Catalina defaultHost=localhost jvmRoute=lin-200
        Realm className=org.apache.catalina.realm.UserDatabaseRealm 
resourceName=UserDatabase/
        Host name=localhost  appBase=webapps unpackWARs=true 
autoDeploy=true
              xmlValidation=false xmlNamespaceAware=false

          Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster 
channelSendOptions=6 channelStartOptions=3

              Manager className=org.apache.catalina.ha.session.DeltaManager
                  expireSessionsOnShutdown=false
                  notifyListenersOnReplication=true/

              Channel