Apache + Tomcat with mod_jk - website freezes

I have a website with apache 1.3 (with SSL support) + mod_jk + tomcat 5.5 on Linux redhad setup. Most recently, I had a downtime problem with my website. Once a day, I take my website to port 80. But if I access directly via tomcat 8080 responses, and the website is working fine. Ports 80 and 8080 are available, but the connection of apache and tomcat with mod_jk is broken. Only after rebooting tomcat does everything return to normal.

I just configured apache mod_Jk to log errors, so I will see if there will be any error on the next hang.

apache mod_js conf:

JkShmSize 1000M 

apache workers conf:

 worker.list=worker1 worker.worker1.type=ajp13 worker.worker1.host=127.0.0.1 worker.worker1.port=8009 worker.worker1.lbfactor=1 worker.worker1.socket_keepalive=1 worker.worker1.recycle_timeout=180 worker.worker1.sticky_session=False 

I checked web application errors / warning logs on tomcat, I have some javascript exceptions. Can an application error cause this problem? Could this be a website overload problem or a memory leak? Currently, dev/mapper/VolGroup00-LogVol00 has only 4% free space. Could this be the cause of the problem?

I also got this log entry, this corresponds to server hang time:

/ var / log / messages: SYN may be flooded on port 8009. Sending cookies

Update: I just got another one, mod_jk log gives the following:

[Sun Nov 14 00:57:03 2010] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the response message from tomcat, network problems or tomcat is$ [Sun Nov 14 00:57:03 2010] [error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Nov 14 00:57:08 2010] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the response message from tomcat, network problems or tomcat is$ [Sun Nov 14 00:57:08 2010] [error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Nov 14 00:57:12 2010] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the response message from tomcat, network problems or tomcat is$ [Sun Nov 14 00:57:12 2010] [error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Nov 14 00:57:12 2010] [error] ajp_service::jk_ajp_common.c (1758): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. w$ [Sun Nov 14 00:57:12 2010] worker1 mydomain.com 50.999342

It looks like my site is disconnected from port 8009. The AJP 1.3 connector supports apache mod_jk on port 8009.

Any help or advice would be greatly appreciated.

Thanks.

+4
source share
1 answer

You need more data.

1) configure server state handler for apache

2) configure the mod_jk executor status . With this, you can clearly see if this is a communication problem with apache for tomcat.

3) when tomcat freezes again, dump the thread to see where the Java processing is located. Maybe he is waiting for something.

Change If the problem is the apache problem for tomcat ([2]) , see http://community.jboss.org/wiki/OptimalModjk12Configuration

+5
source

All Articles