We are using 2 Apache & 2 Tomcat with LoadBalance. Everyday the site is goes down and restarting Apache & Tomcat only help to bring the site back.
I could see below errors on WebServer's Error Log, when the "total children" count increased more than 200 then Apache is not responding. I have included my prefork configuration below. Kindly please help to resolve this issue.
[Wed Mar 01 11:46:39 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 1 idle, and 464 total children
[Wed Mar 01 11:47:25 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 507 total children
[Wed Mar 01 11:47:34 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 522 total children
[Wed Mar 01 11:47:35 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 3 idle, and 530 total children
[Wed Mar 01 11:48:22 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 578 total children
[Wed Mar 01 11:48:23 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 0 idle, and 586 total children
[Wed Mar 01 11:48:24 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 602 total children
[Wed Mar 01 11:48:25 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 634 total children
[Wed Mar 01 11:48:26 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 666 total children
[Wed Mar 01 11:48:27 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 698 total children
[Wed Mar 01 11:48:28 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 730 total children
[Wed Mar 01 11:48:29 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 762 total children
[Wed Mar 01 11:48:30 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 794 total children
[Wed Mar 01 11:48:31 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 826 total children
[Wed Mar 01 11:48:32 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 858 total children
[Wed Mar 01 11:48:33 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 890 total children
[Wed Mar 01 11:49:08 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 944 total children
[Wed Mar 01 11:49:09 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 2 idle, and 952 total children
[Wed Mar 01 11:50:14 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 3 idle, and 934 total children
mod_jk.log
[Wed Mar 01 11:58:14 2017][24547:2663257856] [info] jk_open_socket::jk_connect.c (594): connect to 100.10.661.32:8009 failed (errno=110)
[Wed Mar 01 11:58:14 2017][24547:2663257856] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (100.10.661.32:8009) (errno=110)
[Wed Mar 01 11:58:14 2017][24547:2663257856] [error] ajp_send_request::jk_ajp_common.c (1507): (live_svr) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=110)
[Wed Mar 01 11:58:14 2017][24547:2663257856] [info] ajp_service::jk_ajp_common.c (2447): (live_svr) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Wed Mar 01 11:58:14 2017][24318:2663257856] [info] jk_open_socket::jk_connect.c (594): connect to 100.10.661.32:8009 failed (errno=110)
[Wed Mar 01 11:58:14 2017][24318:2663257856] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (100.10.661.32:8009) (errno=110)
[Wed Mar 01 11:58:14 2017][24318:2663257856] [error] ajp_send_request::jk_ajp_common.c (1507): (live_svr) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=110)
[Wed Mar 01 11:58:14 2017][24318:2663257856] [info] ajp_service::jk_ajp_common.c (2447): (live_svr) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Wed Mar 01 11:58:14 2017][24282:2663257856] [info] jk_open_socket::jk_connect.c (594): connect to 100.10.661.32:8009 failed (errno=110)
-------------------------------------------------------------------------------
httpd.conf:
KeepAlive On
Timeout 300
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers 80
ServerLimit 3500
MaxClients 3500
MaxRequestsPerChild 0
</IfModule>
mod_jk.conf:
<IfModule worker.c>
StartServers 6
MaxClients 230
MinSpareThreads 75
MaxSpareThreads 150
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
Daily 20K Plus People will visit our sites. Kindly please provide the solution to resolve this issue.
--
Thanks & Regards,
Jayaram Ponnusamy