Re: Tomcat Crashed when the concurrent Users reached 150

2019-12-10 Thread Jayaram Ponnusamy
Thanks a Lot Mark

On Mon, Dec 9, 2019 at 2:22 PM Mark Thomas  wrote:

> On 09/12/2019 06:41, Jayaram Ponnusamy wrote:
> > Thanks for your Valuable Comments:
> > We are using Apache Tomcat/8.0.50 and Mod_JK mod_jk/1.2.28
> >
> > The Above configuration made by some consultant. We are in the
> situation to
> > correct all the things to make it for high availability.
> > Also we are in the process of upgrading the apache to 2.4.25 with mod_jk/
> > 1.2.42. And Event MPM instead of Prefork.
> >
> > Please let us know do we need to use worker MPM also or EVENT MPM is
> fine?
> > If Event MPM with below Configuration then how many concurrent users can
> > access the site and what are the relevant changes needs to be done on
> > Tomcat Side?
> > On Tomcat Servers We have 16GB RAM with 8CPU [Two Nodes]
> >
> > # event MPM
> > 
> > StartServers 1
> > ServerLimit 7
> > MinSpareThreads 250
> > MaxSpareThreads 2500
> > ThreadsPerChild 500
> > ThreadLimit 500
> > MaxRequestWorkers 3500
> > MaxConnectionsPerChild 0
> > 
> >
> >
> > # Tomcat Configuration
> >  > URIEncoding="UTF-8" emptySessionPath="true" maxThreads="600"
> > minSpareThreads="10" connectionTimeout="-1" />
> >  > URIEncoding="UTF-8" maxThreads="600" minSpareThreads="100"
> > connectionTimeout="2" acceptCount="2000" />
> >
> >
> > # Tomcat Configuration
> >  -Xms2048M -Xmx6144M -XX:PermSize=1024m -XX:MaxPermSize=2048m
> >
> >
> >
> >
> > On Thu, Dec 5, 2019 at 7:27 PM Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Jayaram,
> >
> > On 12/5/19 03:19, Jayaram Ponnusamy wrote:
> >>>> We are using apache 2.2.21 on RHEL6.9 and in Backend we are using
> >>>> Tomcat AppServer with JavaBased CMS. Our Server Architecture is
> >>>> *(F5 [For Load Balance] -> Apache WebServer [For Redirection & URL
> >>>> Mapping] -> Tomcat AppServer [Running a Java Based CMS]).*
> >
> > That version of Apache httpd is pretty old and unsupported. RHEL 6.9
> > is also out of support (if I'm reading their Wikipedia page
> > correctly). You may want to upgrade everything while you are looking
> > at all this.
> >
> >>>> We are using Apache to connect Tomcat by MOD_JK and mapping the
> >>>> URL (Attached VirtualHost.conf), and No applications/code are
> >>>> running on WebServers.
> >>>>
> >>>> 1. Two TomcatServers (8 CPU & 16GB RAM on Each Servers) 2. Two
> >>>> WebServers (4 CPU & 8GB RAM on Each Servers)
> >>>>
> >>>> *PROBLEM:* When the Child Process count is reached / crossed 200
> >>>> like below then site is not accessible
> >
> > Do you mean that new connections from httpd -> Tomcat cannot be made?
> >
> >>>> when the child processes reached 300 or More than site crashed
> >
> > Please define "crashed". Got an exception? JVM crash (with hs_pid*
> > file)? Kernel panic?
> >
> >>>> and then we bring the site back by restarting Tomcat & Apache
> >>>> HTTP.
> >
> > Do you need to restart httpd? Or only Tomcat? Or will restarting httpd
> > work?
> >
> >>>> Kindly please check my configuration and help to allow at-least
> >>>> 500 concurrent users.
> >>>>
> >>>> *CONFIGURATION:* * httpd.conf*  StartServers
> >>>> 80 ServerLimit 3500 MaxClients 3500 MaxRequestsPerChild  0
> >>>>   StartServers 6 MaxClients 230
> >>>> MinSpareThreads 75 MaxSpareThreads 150 ThreadsPerChild 25
> >>>> MaxRequestsPerChild 0 
> >
> > Which MPM are you actually using? You have listed both prefork and
> > worker. AFAICT you have to pick one at runtime.
> >
> > For prefork, the maximum number of connections you should expect to be
> > made to each Tomcat backend is 3500 (the value of MaxClients).
> >
> > For worker, the maximum number of connections you should expect to be
> > made to each Tomcat backend is 230.
> >
> >>>> *Tomcat:*  >>>> redirectPort="8443" URIEncoding="UTF-8" emptySessionPath="true"
> >>>> maxThreads="600" minSpareThreads="10" connectionTimeout="-1" />
> >>>>  >>>>

Re: Tomcat Crashed when the concurrent Users reached 150

2019-12-08 Thread Jayaram Ponnusamy
Thanks for your Valuable Comments:
We are using Apache Tomcat/8.0.50 and Mod_JK mod_jk/1.2.28

The Above configuration made by some consultant. We are in the situation to
correct all the things to make it for high availability.
Also we are in the process of upgrading the apache to 2.4.25 with mod_jk/
1.2.42. And Event MPM instead of Prefork.

Please let us know do we need to use worker MPM also or EVENT MPM is fine?
If Event MPM with below Configuration then how many concurrent users can
access the site and what are the relevant changes needs to be done on
Tomcat Side?
On Tomcat Servers We have 16GB RAM with 8CPU [Two Nodes]

# event MPM

StartServers 1
ServerLimit 7
MinSpareThreads 250
MaxSpareThreads 2500
ThreadsPerChild 500
ThreadLimit 500
MaxRequestWorkers 3500
MaxConnectionsPerChild 0



# Tomcat Configuration




# Tomcat Configuration
 -Xms2048M -Xmx6144M -XX:PermSize=1024m -XX:MaxPermSize=2048m




On Thu, Dec 5, 2019 at 7:27 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Jayaram,
>
> On 12/5/19 03:19, Jayaram Ponnusamy wrote:
> > We are using apache 2.2.21 on RHEL6.9 and in Backend we are using
> > Tomcat AppServer with JavaBased CMS. Our Server Architecture is
> > *(F5 [For Load Balance] -> Apache WebServer [For Redirection & URL
> > Mapping] -> Tomcat AppServer [Running a Java Based CMS]).*
>
> That version of Apache httpd is pretty old and unsupported. RHEL 6.9
> is also out of support (if I'm reading their Wikipedia page
> correctly). You may want to upgrade everything while you are looking
> at all this.
>
> > We are using Apache to connect Tomcat by MOD_JK and mapping the
> > URL (Attached VirtualHost.conf), and No applications/code are
> > running on WebServers.
> >
> > 1. Two TomcatServers (8 CPU & 16GB RAM on Each Servers) 2. Two
> > WebServers (4 CPU & 8GB RAM on Each Servers)
> >
> > *PROBLEM:* When the Child Process count is reached / crossed 200
> > like below then site is not accessible
>
> Do you mean that new connections from httpd -> Tomcat cannot be made?
>
> > when the child processes reached 300 or More than site crashed
>
> Please define "crashed". Got an exception? JVM crash (with hs_pid*
> file)? Kernel panic?
>
> > and then we bring the site back by restarting Tomcat & Apache
> > HTTP.
>
> Do you need to restart httpd? Or only Tomcat? Or will restarting httpd
> work?
>
> > Kindly please check my configuration and help to allow at-least
> > 500 concurrent users.
> >
> > *CONFIGURATION:* * httpd.conf*  StartServers
> > 80 ServerLimit 3500 MaxClients 3500 MaxRequestsPerChild  0
> >   StartServers 6 MaxClients 230
> > MinSpareThreads 75 MaxSpareThreads 150 ThreadsPerChild 25
> > MaxRequestsPerChild 0 
>
> Which MPM are you actually using? You have listed both prefork and
> worker. AFAICT you have to pick one at runtime.
>
> For prefork, the maximum number of connections you should expect to be
> made to each Tomcat backend is 3500 (the value of MaxClients).
>
> For worker, the maximum number of connections you should expect to be
> made to each Tomcat backend is 230.
>
> > *Tomcat:*  > redirectPort="8443" URIEncoding="UTF-8" emptySessionPath="true"
> > maxThreads="600" minSpareThreads="10" connectionTimeout="-1" />
> >  > URIEncoding="UTF-8" maxThreads="600" minSpareThreads="100"
> > connectionTimeout="2" acceptCount="2000" />
>
> Note that AJP connections are expected to be persistent; they don't
> close when the request has completed. They don't even really do "keep
> alive" in the same sense as HTTP keepalive. It's more like "always
> keepalive". Once an httpd process opens a connection to a Tomcat
> instance, that connection will remain open for quite a while as long
> as requests continue to be made.
>
> If you are using prefork MPM, the the version of Tomcat you are using
> is critical to understanding what is happening, here. If you are using
> a BIO-based connector, then you will need to increase the number of
> threads on each Tomcat server from 600 to 3500.
>
> If you are using the worker MPM, then your Tomcat should be able to
> handle the 230 maximum connections configured there.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl3pL98ACgkQHPApP6U8
> pFiuAxAAjeYpDrMjjNgFvnC4Y6QS6TXN2dOJ3BuREKXjMitxoIWooNbcJuQ8uhVP
> LbG+2Q9LyhfNxwrWm+urNZOa

Tomcat Crashed when the concurrent Users reached 150

2019-12-05 Thread Jayaram Ponnusamy
  Hello,
We are using apache 2.2.21 on RHEL6.9 and in Backend we are using Tomcat
AppServer with JavaBased CMS.
Our Server Architecture is *(F5 [For Load Balance] -> Apache WebServer [For
Redirection & URL Mapping] -> Tomcat AppServer [Running a Java Based CMS]).*


We are using Apache to connect Tomcat by MOD_JK and mapping the URL
(Attached VirtualHost.conf), and No applications/code are running on
WebServers.

1. Two TomcatServers (8 CPU & 16GB RAM on Each Servers)
2. Two WebServers (4 CPU & 8GB RAM on Each Servers)

*PROBLEM:*
When the Child Process count is reached / crossed 200 like below then site
is not accessible when the child processes reached 300 or More than site
crashed and then we bring the site back by restarting Tomcat & Apache HTTP.
Kindly please check my configuration and help to allow at-least 500
concurrent users.

*CONFIGURATION:*
* httpd.conf*

StartServers 80
ServerLimit 3500
MaxClients 3500
MaxRequestsPerChild  0


StartServers 6
MaxClients 230
MinSpareThreads 75
MaxSpareThreads 150
ThreadsPerChild 25
MaxRequestsPerChild 0


*Tomcat:*




-- 

-- 

*Thanks & Regards,*
*Jayaram Ponnusamy*
Mobile: +974-5512-3315


Help On Tomcat Process which is utilizing more than 300%

2016-12-03 Thread Jayaram Ponnusamy
Dear All,

I am new to Tomcat We are using Tomcat 7.0.42 with JVM 1.7.0_40-b43 on Rhel
6 (8 Core CPU).
Suddenly tomcat process start utilizing more than 300% and our website
performance went down.

I couldn't find anything in the Log. Kindly please help me to resolve this
issue.

-- 

*Thanks & Regards,*

*Jayaram Ponnusamy*


Help on catalina.out file which is reached more than 8 GB

2016-12-03 Thread Jayaram Ponnusamy
Dear All,

I am new to Tomcat, and in our production environment, the catalina.out
reached more than 8GB, and we are removing it manually. So,Kindly please
help me to set maximum size will be 25MB and keep 7days Logs only.


We are using Tomcat 7.0.42.0 in Rhel 6


Thanks
Jayaram


Re: Round Robin LoadBalance/Failover Configuration for Apache

2016-10-17 Thread Jayaram Ponnusamy
Hi Christopher,

Thanks for the reply. I am new to Apache and Tomcat, Our Tomcat is not
cluster and Sticky is not enabled.
Could you please let me know which one will be help to avoid failover if
one Tomcat went down.

Thanks
Jayaram

On Sun, Oct 16, 2016 at 10:32 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Jayaram,
>
> On 10/13/16 1:00 AM, Jayaram Ponnusamy wrote:
> > Hi All,
> >
> > Currently we have two webServers (WA and WB) and two Tomcat Servers
> > (TA, TB). WA configured for TA and WB configured for TB. How to
> > configure Loadbalance and Failover between these two Servers.
> >
> > For Eg. WA is connected with TA, if TA failed then WA should
> > connect TB, Similarly WB connect TA if TB is failed.
> >
> > It may simple, but I am new to Apache. Most of the LB example
> > described for 1WEB and TWO AppServer. Kindly please help me to
> > solve this problem
> >
> > Given workers.properties details below. Kindly please help me to
> > solve this issue.
> >
> > WEB-A's workers.properties worker.list=wa worker.wa.type=ajp13
> > worker.wa.host=ta worker.wa.port=9009
> >
> > WEB-B's workers.properties worker.list=wb worker.wb.type=ajp13
> > worker.wb.host=tb worker.wb.port=9009
>
> Are your Tomcat instances in a cluster? Do you want them to be? Are
> you using sticky sessions? Do you want to use sticky sessions?
>
> Is it okay for users who are failed-over to the other server to have
> to re-authenticate with your application to continue?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJYA9XAAAoJEBzwKT+lPKRY0esQAMium0WaEZLtznE5pMmSAu28
> SwP4p/wGv5QiVXm7RDcIqIEG1oTa/6KVRUukmNE695i293qAIBhZI/HM7whip038
> C3X/IG/3e+pe06wt31osnzKbwWEDdnWaLKyGXaF3N1fzaII5MBxPst/mDMhmfclK
> oIgFBIgwTuKA760HL0yWIph7Slg4DSg/ZkJxdSKM2wXkf+oJq+e2/mJOBgpgbm82
> fz5JYL6FIWEobbONKLbZNEFL+670Xc+IxD+irkqwhURGihelyQ9ads9Sz2JpoT9J
> gpeEwmtu4pXi7RYlA67/qST/gVmYlfWWaurcpfWiEZhwXz0cotx73AmBEJCSr7Ml
> nkXLbhJThx4YWpZtjmrBfXAd4Z4SW6W9rCB/VmB1QtL+pEv5n2lsi6bOV+vA3BxK
> oAbicf/CI6HRUyE2Ar+IPmjtSnxu1n7q/ZhLkIkcQF/05VuEoQ92eVqoRvoM2dSA
> aQDYZAL9IiAtHrb5fq+r6vHowRlCtZP1rTHniXoUnILRHCA1xeMU1VN60XzWbUwo
> 11a+C37ZeAStlnpH2TbRptwdGFY78F2H2GBDdw4s/xrU1MvYaN1x3H+b2CJhBFMm
> CFhpWtGsE5WDMYVd/ujelB9FgzPcryKlUSBvNnRpzm5qntO2orS5CTfUFhQVsFU/
> Mm0GELyJ+oVLRGRTp8sJ
> =8Q5b
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


--


Round Robin LoadBalance/Failover Configuration for Apache

2016-10-12 Thread Jayaram Ponnusamy
Hi All,

Currently we have two webServers (WA and WB) and two Tomcat Servers (TA,
TB). WA configured for TA and WB configured for TB. How to configure
Loadbalance and Failover between these two Servers.

For Eg. WA is connected with TA, if TA failed then WA should connect TB,
Similarly WB connect TA if TB is failed.

It may simple, but I am new to Apache. Most of the LB example described for
1WEB and TWO AppServer. Kindly please help me to solve this problem

Given workers.properties details below. Kindly please help me to solve this
issue.

WEB-A's workers.properties
worker.list=wa
worker.wa.type=ajp13
worker.wa.host=ta
worker.wa.port=9009



WEB-B's workers.properties
worker.list=wb
worker.wb.type=ajp13
worker.wb.host=tb
worker.wb.port=9009

-- 

*Thanks & Regards,*
*Jayaram *


Making Local reference for Directories

2016-09-04 Thread Jayaram Ponnusamy
Dear All,

Our System Architecture is Apache WebServer-> Tomcat-> CMS System.
we stored all our files under /files in CMS and this folder is shared
FileSystem. So, WebServer also can access it.


Currently if any images has to load on the site then first Apache sending
request to Tomcat and Tomcat Communicate CMS to load the file from
specified folder. To avoiding delay, we want to load directly from
WebServer.

In Tomcat we added context for /files to point /opt/apps/shared/cms/files.
Similarly can create any context in WebServer to point some local directory?

For eg. if http://abc. com/files/xcxcxcxc/xcxcx/xcxcx then it has to be
load from WebServer's local directory (FileSystem). Kindly please let me on
this and sorry for my Bad English



-- 

*Thanks & Regards,*
*Jayaram Ponnusamy*


Re: Connectivity Issue with Tomcat7 and WebServer (AJP Connector)

2016-08-10 Thread Jayaram Ponnusamy
Hi André,
Kindly please find my answer below:

On Tue, Aug 9, 2016 at 11:49 AM, André Warnier (tomcat) <a...@ice-sa.com>
wrote:

> On 09.08.2016 09:48, Jayaram Ponnusamy wrote:
>
>> Thanks André,
>> Kindly please find my answer below:
>>
>> On Tue, Aug 9, 2016 at 12:02 AM, André Warnier (tomcat) <a...@ice-sa.com>
>> wrote:
>>
>> On 08.08.2016 11:18, Jayaram Ponnusamy wrote:
>>>
>>> Thanks André,
>>>>
>>>> 1. ANS-Question 1 = Both Tomcat & WebServer installed on different
>>>> Machines, Attached Architecture diagram of our environment. Our Tomcat
>>>> are
>>>> configured as Application Clustering, and WebServer1 is pointing to
>>>> Tomcat1
>>>> and WebServer2 is pointing to Tomcat2
>>>> Tomcat's IP (Node1): 10.100.0.31
>>>> WebServer's IP (Node1): 10.100.15.21
>>>>
>>>> Tomcat's IP (Node2): 10.100.0.32
>>>> WebServer's IP (Node2): 10.100.15.22
>>>>
>>>> 2. ANS-Question 2 = Thanks, Thats fine :)
>>>>
>>>> 3. ANS-Question 3 = Attached Architecture diagram for your reference.
>>>>
>>>>
>>>> There are a lot of separate pieces in your configuration, and the
>>> problem
>>> could be at any level. So we must do this step-by-step, systematically,
>>> and
>>> try to find out exactly where things are not working properly. The
>>> keywords
>>> here are "step-by-step" and "sytematically", because with so many pieces,
>>> if we start making changes left and right without first understanding
>>> what
>>> the problem is, we will never find out.
>>>
>>> First, I'll make some comments based on the configuration schema that you
>>> provided, and you will tell me if this is right or wrong, ok ? And I have
>>> some questions in between..
>>> Please answer the questions below directly under each question, to make
>>> it
>>> easier to follow.
>>>
>>>
>>> 1) Note : I do not know what you mean exactly by "Application
>>> Clustering",
>>> and I don't know exactly how an F5 load-balancer works.  But I will
>>> assume
>>> that in this case, we can consider only the chain from the user
>>> workstation
>>> to Tomcat #1, and that any results can be extrapolated to other cases.
>>> I also assume that Tomcat #1 and Tomcat #2 run the same applications, but
>>> that they are totally independent from eachother, and that Tomcat #1 and
>>> Tomcat #2 never talk to one another directly (true/false ?) ANS: TRUE
>>>
>>> 2) I assume that the problems that you are mentioning are happening when
>>> a
>>> user workstation client accesses the Tomcat application as follows :
>>> (You may need to reformat this as 2 text lines, to see it correctly)
>>>
>>> user wks <-- HTTP(S) --> F5 <-- HTTP --> Apache #1 + mod_jk <-- AJP -->
>>> Tomcat <-- webapp
>>>(1)(2) (3)
>>> where :
>>> - HTTP(S) is the protocol used on the connection (1) between the client
>>> workstation and the F5 load-balancer
>>> - HTTP(S) is the protocol used on the connection (2) between the F5
>>> load-balancer and Apache webserver #1 (IP 10.100.15.21)
>>> - AJP is the protocol used on the connection (3) between Apache webserver
>>> #1 ((IP 10.100.15.21) and Tomcat #1 (IP 10.100.0.31)  (*)
>>> - "Tomcat" actually means "Tomcat and its AJP , listening on
>>> port 9009
>>>
>>> All correct ?
>>>
>>>
>> ANS::
>>
>>   ||=> WebServer1 (http://web1abc.com/sites)>Tomcat1 (
>> http://tom1abc:9090/sites)
>> F5 (http://f5.abc.com) =||
>> ||=> WebServer2 (http://web1abc.com/sites)>Tomcat1 (
>> http://tom21abc:9090/sites)
>>
>> Application Clustering Means, While installing the Second Node (Portal
>> Application on Tomcat) There is an option to choose install as Application
>> cluster. Primarily Tomcat will not talk each other, but Portal Application
>> will consider both are same with clustering
>>
>>
>> 2) To access the application, the user enters a URL in his browser.
>>> Can you give us an example of such a URL ? You can change the real name
>>> of
>>> the server for privacy, but then be consistent about this in the future,
>>> because it is important to follow what is going 

Re: Connectivity Issue with Tomcat7 and WebServer (AJP Connector)

2016-08-09 Thread Jayaram Ponnusamy
Thanks André,
Kindly please find my answer below:

On Tue, Aug 9, 2016 at 12:02 AM, André Warnier (tomcat) <a...@ice-sa.com>
wrote:

> On 08.08.2016 11:18, Jayaram Ponnusamy wrote:
>
>> Thanks André,
>>
>> 1. ANS-Question 1 = Both Tomcat & WebServer installed on different
>> Machines, Attached Architecture diagram of our environment. Our Tomcat are
>> configured as Application Clustering, and WebServer1 is pointing to
>> Tomcat1
>> and WebServer2 is pointing to Tomcat2
>> Tomcat's IP (Node1): 10.100.0.31
>> WebServer's IP (Node1): 10.100.15.21
>>
>> Tomcat's IP (Node2): 10.100.0.32
>> WebServer's IP (Node2): 10.100.15.22
>>
>> 2. ANS-Question 2 = Thanks, Thats fine :)
>>
>> 3. ANS-Question 3 = Attached Architecture diagram for your reference.
>>
>>
> There are a lot of separate pieces in your configuration, and the problem
> could be at any level. So we must do this step-by-step, systematically, and
> try to find out exactly where things are not working properly. The keywords
> here are "step-by-step" and "sytematically", because with so many pieces,
> if we start making changes left and right without first understanding what
> the problem is, we will never find out.
>
> First, I'll make some comments based on the configuration schema that you
> provided, and you will tell me if this is right or wrong, ok ? And I have
> some questions in between..
> Please answer the questions below directly under each question, to make it
> easier to follow.
>
>
> 1) Note : I do not know what you mean exactly by "Application Clustering",
> and I don't know exactly how an F5 load-balancer works.  But I will assume
> that in this case, we can consider only the chain from the user workstation
> to Tomcat #1, and that any results can be extrapolated to other cases.
> I also assume that Tomcat #1 and Tomcat #2 run the same applications, but
> that they are totally independent from eachother, and that Tomcat #1 and
> Tomcat #2 never talk to one another directly (true/false ?) ANS: TRUE
>
> 2) I assume that the problems that you are mentioning are happening when a
> user workstation client accesses the Tomcat application as follows :
> (You may need to reformat this as 2 text lines, to see it correctly)
>
> user wks <-- HTTP(S) --> F5 <-- HTTP --> Apache #1 + mod_jk <-- AJP -->
> Tomcat <-- webapp
>   (1)(2) (3)
> where :
> - HTTP(S) is the protocol used on the connection (1) between the client
> workstation and the F5 load-balancer
> - HTTP(S) is the protocol used on the connection (2) between the F5
> load-balancer and Apache webserver #1 (IP 10.100.15.21)
> - AJP is the protocol used on the connection (3) between Apache webserver
> #1 ((IP 10.100.15.21) and Tomcat #1 (IP 10.100.0.31)  (*)
> - "Tomcat" actually means "Tomcat and its AJP , listening on
> port 9009
>
> All correct ?
>

ANS::

 ||=> WebServer1 (http://web1abc.com/sites)>Tomcat1 (
http://tom1abc:9090/sites)
F5 (http://f5.abc.com) =||
||=> WebServer2 (http://web1abc.com/sites)>Tomcat1 (
http://tom21abc:9090/sites)

Application Clustering Means, While installing the Second Node (Portal
Application on Tomcat) There is an option to choose install as Application
cluster. Primarily Tomcat will not talk each other, but Portal Application
will consider both are same with clustering


> 2) To access the application, the user enters a URL in his browser.
> Can you give us an example of such a URL ? You can change the real name of
> the server for privacy, but then be consistent about this in the future,
> because it is important to follow what is going on.
> So let's say for example that the F5 is known to the outside world as "
> myF5.mycompany.com", and let's always keep using that same hostname for
> it in the future.
> So the client enters the URL : http://myF5.mycompany.com.. ?
> (Add the port if any, and a sample URL)
>
ANS:
Client Access URL: http://f5abc.com/sites/en_US/about,
http://f5abc.com/sites/en_US/offices, http://f5abc.com/sites/ar_QA/newsroom
Through Tomcat : http://tom1abc:9090/sites/en_US/about,
http://tom1abc:9090/sites/en_US/offices,
http://tom1abc:9090/sites/ar_QA/newsroom

>
> 3) the F5 decides, on the base of some criteria, to forward this HTTP
> request to Apache webserver #1 or Apache webserver #2.
> But for the sake of this example, let's assume that it chooses Apache #1
> this time.
>
> Question 3.1 : how does the F5 forward this request to Apache webserver #1
> ? does it just copy the original request transparently, and send it to the
> IP address 10.100.15.21 ?
> Or does it 

Re: Connectivity Issue with Tomcat7 and WebServer (AJP Connector)

2016-08-08 Thread Jayaram Ponnusamy
Thanks André,

1. ANS-Question 1 = Both Tomcat & WebServer installed on different
Machines, Attached Architecture diagram of our environment. Our Tomcat are
configured as Application Clustering, and WebServer1 is pointing to Tomcat1
and WebServer2 is pointing to Tomcat2
Tomcat's IP (Node1): 10.100.0.31
WebServer's IP (Node1): 10.100.15.21

Tomcat's IP (Node2): 10.100.0.32
WebServer's IP (Node2): 10.100.15.22

2. ANS-Question 2 = Thanks, Thats fine :)

3. ANS-Question 3 = Attached Architecture diagram for your reference.




​

Thanks
Jayaram

On Mon, Aug 8, 2016 at 11:20 AM, André Warnier (tomcat) <a...@ice-sa.com>
wrote:

> On 08.08.2016 09:14, Jayaram Ponnusamy wrote:
>
>> Thanks for your Quick & Valuable Response,
>>
>> 1. ANS-Question 1: No Both Are different Machine, We are using VirtualHost
>> configuration
>>
>
> That is not consistent with the configuration that you sent.
> You have a ServerName (in Apache) named as "ServerName 10.100.0.31" (which
> is not a proof, but a suggestion that the IP of this machine is
> 10.100.0.31).
> And you have this line in workers.properties :
> worker.prod_live_svr.host=10.100.0.31
> which suggest that Tomcat answers to the same address.
> So why are you saying "different machine" ?
>
> 2. ANS-Question 2: Kindly please share Optimal Value to Set for
>> ConnectionTimeout & KeepAliveTimeout if required
>>
>
> One again, there is no "optimal" value for all cases.
> But the default values should cover most of the usual cases.
> The default values are the ones that are active if you do not specify the
> parameter at all.  So just remove these parameters, and you should be ok.
> If there is a problem such as you mention below, it is NOT because of the
> default value of these parameters.
>
> 3. ANS-Question 3: Yes We have Firewall, but there is no rules. I just
>> googled and updated this value to tuning server. Now I removed
>>
>
> Can you draw a simple schema of your configuration ? (ASCII-art)
> Showing clearly :
> - where is the workstation
> - where is Apache httpd
> - where is the firewall
> - where is Tomcat
>
> We do not have access to your server, so it is more complicated for
> helping you, unless you provide us with precise information.
>
>
> 4. ANS-Question 4: I am new to Apache, While searching in Google, Based on
>> some recommandationI tried. I removed all these items.
>>
>>
> Good.
>
> Now I am monitoring systems, whether still its closing connections or not.
>>
>> sir, While directly using Tomcat URL, pages are loading 1-2 Seconds, but
>> the same page taking 6-7 Seconds in WebServer URL.
>> Also, If I didn't use WebServer URL for 30minutes and hit any URL, first
>> time its taking more than 30 Seconds to load a page.
>>
>> Is there any option to tuning the system.
>>
>>
> See item 3 above.
> Clearly, you have a problem.  But without knowing your exact
> configuration, we can only guess.  Clearly also, it is not a problem of
> Tomcat per se.
> To me, with the little information available so far, it sounds like it
> could be a problem with DNS or routing, but that's just a wild guess so far.
>
>
>
>
>> On Mon, Aug 8, 2016 at 12:53 AM, André Warnier (tomcat) <a...@ice-sa.com>
>> wrote:
>>
>> On 07.08.2016 11:08, Jayaram Ponnusamy wrote:
>>>
>>> Hi,
>>>> We are using Tomcat 7.0.42.0, AJP/1.3 with Apache 2.2.21.
>>>> Connecting Apache to Tomcat as VirtualHost, The Problem is Apache and
>>>> Tomcat losing its connection every 20-30 Minutes. Either We have to hit
>>>> the
>>>> WebServer URL multiple times or Reboot Apache & Tomcat to resolve the
>>>> issue
>>>> for short-time.
>>>> Also accessing WebServer URL is very very slow than tomcat URL (Mostly
>>>> it
>>>> takes 30-45seconds to load a Page).
>>>>
>>>> I have added tomcat/Apache configurations below, Kindly please help me
>>>> to
>>>> resolve this issue.
>>>>
>>>>
>>>> Tomcat (Server.xml):
>>>> >>>
>>>> protocol="HTTP/1.1"
>>>
>>>connectionTimeout="60"
>>>>redirectPort="8443"
>>>>URIEncoding="UTF-8" emptySessionPath="true"/>
>>>>
>>>>
>>> >>
>>>> URIEncoding="UTF-8" connectionTimeout="60"/>  <-- (*)
>>>>
>>>>
>>>> Apache (Workers.properties):
>>>

Re: Connectivity Issue with Tomcat7 and WebServer (AJP Connector)

2016-08-08 Thread Jayaram Ponnusamy
Thanks for your Quick & Valuable Response,

1. ANS-Question 1: No Both Are different Machine, We are using VirtualHost
configuration
2. ANS-Question 2: Kindly please share Optimal Value to Set for
ConnectionTimeout & KeepAliveTimeout if required
3. ANS-Question 3: Yes We have Firewall, but there is no rules. I just
googled and updated this value to tuning server. Now I removed
4. ANS-Question 4: I am new to Apache, While searching in Google, Based on
some recommandationI tried. I removed all these items.

Now I am monitoring systems, whether still its closing connections or not.

sir, While directly using Tomcat URL, pages are loading 1-2 Seconds, but
the same page taking 6-7 Seconds in WebServer URL.
Also, If I didn't use WebServer URL for 30minutes and hit any URL, first
time its taking more than 30 Seconds to load a page.

Is there any option to tuning the system.

Thanks
Jayaram


On Mon, Aug 8, 2016 at 12:53 AM, André Warnier (tomcat) <a...@ice-sa.com>
wrote:

> On 07.08.2016 11:08, Jayaram Ponnusamy wrote:
>
>> Hi,
>> We are using Tomcat 7.0.42.0, AJP/1.3 with Apache 2.2.21.
>> Connecting Apache to Tomcat as VirtualHost, The Problem is Apache and
>> Tomcat losing its connection every 20-30 Minutes. Either We have to hit
>> the
>> WebServer URL multiple times or Reboot Apache & Tomcat to resolve the
>> issue
>> for short-time.
>> Also accessing WebServer URL is very very slow than tomcat URL (Mostly it
>> takes 30-45seconds to load a Page).
>>
>> I have added tomcat/Apache configurations below, Kindly please help me to
>> resolve this issue.
>>
>>
>> Tomcat (Server.xml):
>> >
> protocol="HTTP/1.1"
>
>>   connectionTimeout="60"
>>   redirectPort="8443"
>>   URIEncoding="UTF-8" emptySessionPath="true"/>
>>
>
> > URIEncoding="UTF-8" connectionTimeout="60"/>  <-- (*)
>>
>>
>> Apache (Workers.properties):
>> worker.list=prod_live_svr
>> worker.prod_live_svr.type=ajp13
>>
>> worker.prod_live_svr.host=10.100.0.31
>> worker.prod_live_svr.port=9009
>> worker.prod_live_svr.lbfactor=50
>> worker.prod_live_svr.socket_keepalive=1
>>
>> worker.prod_live_svr.connection_pool_size=100
>> worker.prod_live_svr.connection_pool_minsize=50
>> worker.prod_live_svr.connection_pool_timeout=500
>>
>>
>> VirtualHost.conf:
>> 
>>
>> ServerName 10.100.0.31
>>
>>
>> ErrorLog logs/live/http_error.log
>> RewriteLog logs/live/http_rewrite.log
>>
>> RewriteEngine on
>> RewriteCond %{REMOTE_ADDR} !^10\.100\.0\.31$
>> RewriteRule ^/+$ /sites/  [R,L]
>>
>> 
>> Options +FollowSymlinks
>> RewriteEngine On
>>
>> RewriteOptions Inherit
>> RewriteLog logs/rewrite.log
>>
>> 
>> JkMount   /*prod_live_svr
>>
>> JkOptions +ForwardURICompatUnparsed
>>
>> 
>>
>>
>>
> 1) Question : are Apache httpd and Tomcat on the same machine ?
>
> And if yes, why do you not set
>
> worker.prod_live_svr.host=127.0.0.1
>>
>
> 2) why : connectionTimeout="60"  (*)
> That is 5 minutes.
> By default, "keepAliveTimeout" is also that same value.
> It means that after a request is processed (and finished) on one instance
> of a Connector, this Connector will remain "stuck" on the same connection
> for another 5 minutes, before it gives up and closes it.  That is kind of
> wasteful.
>
> 3) Why this : worker.prod_live_svr.socket_keepalive=1
> Do you have a firewall between Apache httpd and Tomcat ?
>
> 4) Why these ?
>
>> worker.prod_live_svr.connection_pool_size=100
>> worker.prod_live_svr.connection_pool_minsize=50
>> worker.prod_live_svr.connection_pool_timeout=500
>>
>
> See : http://tomcat.apache.org/connectors-doc/reference/workers.html
> --> connection_pool_size
> --> connection_pool_minsize
> --> connection_pool_timeout  (see also (*) above)
>
> In general (and particularly since you do not seem to be an expert in this
> kind of configuration), you should not set parameters when you do not
> understand exactly what they are doing.
> The default configurations of Apache httpd, Tomcat and AJP are set by
> experts (who know what they are doing), to values which fit a wide range of
> realistic use cases.
>
> I would suggest to rewrite your configuration as follows :
>
> I) Tomcat server.xml :
>
>   URIEncoding="UTF-8">
>
> II) Apache httpd, workers.properties :
>
> worker.list=prod_live_svr
>
> worker.prod_live_svr.type=ajp13
> worker.prod_live_svr.host=127.0.0.1
> worker.prod_live_svr.port=9009
>
> -
>
> That's it, no other parameters.
>
> The Apache-side mod_jk connector module will by default and reasonably set
> the connection pool size, keepalive and timeout values etc.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 

*Thanks & Regards,*
*Jayaram Ponnusamy*
Mobile: +974-5512-3315


Connectivity Issue with Tomcat7 and WebServer (AJP Connector)

2016-08-07 Thread Jayaram Ponnusamy
Hi,
We are using Tomcat 7.0.42.0, AJP/1.3 with Apache 2.2.21.
Connecting Apache to Tomcat as VirtualHost, The Problem is Apache and
Tomcat losing its connection every 20-30 Minutes. Either We have to hit the
WebServer URL multiple times or Reboot Apache & Tomcat to resolve the issue
for short-time.
Also accessing WebServer URL is very very slow than tomcat URL (Mostly it
takes 30-45seconds to load a Page).

I have added tomcat/Apache configurations below, Kindly please help me to
resolve this issue.


Tomcat (Server.xml):



Apache (Workers.properties):
worker.list=prod_live_svr
worker.prod_live_svr.type=ajp13

worker.prod_live_svr.host=10.100.0.31
worker.prod_live_svr.port=9009
worker.prod_live_svr.lbfactor=50
worker.prod_live_svr.socket_keepalive=1

worker.prod_live_svr.connection_pool_size=100
worker.prod_live_svr.connection_pool_minsize=50
worker.prod_live_svr.connection_pool_timeout=500


VirtualHost.conf:


ServerName 10.100.0.31


ErrorLog logs/live/http_error.log
RewriteLog logs/live/http_rewrite.log

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^10\.100\.0\.31$
RewriteRule ^/+$ /sites/  [R,L]


Options +FollowSymlinks
RewriteEngine On

RewriteOptions Inherit
RewriteLog logs/rewrite.log


JkMount   /*prod_live_svr

JkOptions +ForwardURICompatUnparsed




-- 

*Thanks & Regards,*

*Jayaram*