-----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* <IfModule prefork.c> StartServers > 80 ServerLimit 3500 MaxClients 3500 MaxRequestsPerChild 0 > </IfModule> <IfModule worker.c> StartServers 6 MaxClients 230 > MinSpareThreads 75 MaxSpareThreads 150 ThreadsPerChild 25 > MaxRequestsPerChild 0 </IfModule> 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:* <Connector port="9090" protocol="HTTP/1.1" > redirectPort="8443" URIEncoding="UTF-8" emptySessionPath="true" > maxThreads="600" minSpareThreads="10" connectionTimeout="-1" /> > <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" > URIEncoding="UTF-8" maxThreads="600" minSpareThreads="100" > connectionTimeout="20000" 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+urNZOaJBhSrJYjBoZfBG94LUPw7TcmBy24J5H4YjT00i4A zwfDutOIUxmBBSrLoPT+updAnYEosR0S/ghYbtf7d/0xgjeYfdCINhVj5g2M0jyh aahVO+bQ/qdaUzrJLdr2oka3ee5e5dpUr9LnextqXjpCJ+/vIN1h3pX0a4q+i9jD Z55KjydFz2rloliOq4HvOlZcZqufN5QUlcZ5JELh06LurFVuuhQ6uM3r0ykIM2i3 tMg/stXQL9HVCuo2T6eIfqW12COJWV+9uYe8urb9czPt9lCIyCI9L85HfyGdvnj8 rvDnSF45ZwedcNRwgfXgECWV2dm3EnuNrK0ca5PyFESH9IE54Zhh/Mer/pslCz9B wFdQJMBqqsrDEwDqifWjcobzJjTbB7olx1okq/MJ+AWntvSB+/afsNAC3zO33z2A T/2ysW3MpnBCsjauxLyFXUQchLSv83laSDezrBOg3mZt1wZk3imW4XTJf7BBlsO8 ffjIWAZ/BMp92+tXqpEtFBySGolGC4lOFU9vXrt9Kn3qCv2+fv0H8pCQTzsL+Nuf +CpEXnX8KnZtr97B/4M2LfRDhd8k9FZsrCU/mAEZUpKv89ZGWxI= =l2rL -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org