Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: mod_jk setup with Tomcat 7 freezes and 502 |
|
Author |
|
b0s
Joined: 15 Nov 2013 Posts: 2 Location: Estonia, Tartu
|
Posted: Thu 03 Apr '14 12:29 Post subject: mod_jk setup with Tomcat 7 freezes and 502 |
|
|
Hi
A rather complicated tomcat java webapp freezes ~3 times a week. The application itself installed and configured tomcat, but apache and mod_jk I installed myself.
Freeze = main page does not load and nothing is written into catalina.out about it (loglevel warn). And going directly though aadress:8080/appmain is also "frozen". Not sure if this is caused by mod_jk somehow, so I would need to know if my setup is correct in that part. Can this tomcat freeze be caused by apache or mod_jk at all?
If this cannot be caused by my apache, mod_jk setup I need to contact the software-s support.
Soft:
Centos 6.4
Oracle JDK 1.7.051
tomcat 7.0.33 preconfigured by the application
mod_jk version 1.2.39
Apache 2.2.15
The application is meant to be accessed though apache-s SSL for certificate information ( SSLOptions +ExportCertData). https://aadress/appmain
httpd.conf changes:
Timeout 60
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 10
<IfModule worker.c>
StartServers 4
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 5000
</IfModule>
And aliases like Alias /app_html/ "/opt/app/appname/app_html/"
SSL.conf contains Certificate handling and some RewriteCond-s for ending session.
workers.properties
workers.tomcat_home=/opt/user/app/Tomcat
workers.java_home=/usr/java/latest/
ps=/
#ajp13 worker
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.socket_keepalive=1
worker.ajp13.socket_timeout=15
worker.ajp13.retries=3
worker.ajp13.retry_interval=100
worker.ajp13.max_packet_size=16384
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)amd64$(ps)server$(ps)libjvm.so
mod_jk.conf
<IfModule !mod_jk.c>
LoadModule jk_module /etc/httpd/modules/mod_jk.so
</IfModule>
JkWorkersFile "/etc/httpd/conf.d/workers.properties"
JkLogFile "/etc/httpd/logs/mod_jk.log"
JkShmFile "/etc/httpd/logs/mod_jk.shm"
JkRequestLogFormat "%w %V %T"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +DisableReuse
JkMount /appmain ajp13
JkMount /appmain/* ajp13
Adding to mod_jk advanced options like keepalives, retries, JkShmFile, +DisableReuse and enabling apache-s keepalive caused 502 bad gateway errors showing up.
Is there something wrong is this setup, that could cause a tomcat freeze or 502 bad gateway errors?
Thank you in advance! |
|
Back to top |
|
|
|
|
|
|