- 浏览: 255590 次
- 性别:
- 来自: 广州
文章分类
最新评论
-
郑涵魁:
这才是好文啊
一次使用Eclipse Memory Analyzer分析Tomcat内存溢出 -
silvia016:
很有用,非常感谢
一次使用Eclipse Memory Analyzer分析Tomcat内存溢出 -
chengcwn:
好文章,多谢分享!
一次使用Eclipse Memory Analyzer分析Tomcat内存溢出 -
young7:
不错,特别是那个参考文章
JAVA调用Shell脚本--及阻塞的解决办法 -
zhujianbogo:
什么邮件列表,能说下解决方案吗? 谢谢 。 我也遇到这个问题了 ...
Tomcat与apache2集群的问题
最近在Tomcat与apache2集群的问题的应用程序中,
有一个文件下载的功能。在连续多次点击下载,然后再打开的下载对话框点击【取消】之后。出现服务器无法访问503的错误。
错误日志:
catalina.out: Exception thrown whilst processing POSTed parameters java.io.IOException at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:205) at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:179) at org.apache.coyote.Request.doRead(Request.java:419) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:264) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403) at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:279) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
最后在tomcat的邮件列表里面找到的原因:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200911.mbox/%3Chen6qc$3rg$1@ger.gmane.org%3E
"ArthIT" <arthur.hupka@innovations.de> wrote in message news:26531167.post@talk.nabble.com... > > Hi, > > we are facing some weird problems at one of our customers. > Our application is running on a tomcat server behind a Apache2 Webserver > which does SSL. > The servers are connected with mod_proxy_ajp. > The network is a slow 2MBit WAN which is used to capacity. > > Within this infrastructure we periodically get Broken Pipe Exceptions > which > are caused by an IOException in JKInputStream. > > Conspicuous is the following: When an IOException occurs in most of the > cases (not in all) it is followed by another one, exactly 30seconds later. > I think Apache tries to resend the request to tomcat after a timout is > reached. > > The IOExceptions in JKInputStream are thrown on AjaxRequests only > (realised > with wicktes AjaxFormSubmittingBehavior), which are done on every "onblur" > javascript event. Our app contains pretty complex forms, with many input > fields (>200). If one is tabbing fast through the form many ajax events > are > fired... > > I tried to reproduce this at our companies network with FireFox Network > throttling plugin (500Byte/s up and download), without luck. > > Note: > The customer uses IE6 and IE7. > This problem arises at the special WAN Network only. Our customer has > another internal production system (same application) at a LAN network, > which does not face these Exceptions. > > > Does anybody has a hint or idea what could be going on? That would be > great! > Many thanks in advance to everybody who investigates on this. > The first Exception below is harmless, since it is just Tomcat trying to tell Apache that it is ready for the next request, but Apache has stopped listening. It just results in the Thread going back to the pool. The second Exception below is from Tomcat requesting the POST body from Apache, but not getting it. My best guess is that Apache is timing out when trying to read the request body from the WAN. It then tells mod_proxy_ajp that it couldn't get the data it wants. Then mod_proxy_ajp thinks that the client has gone away, so signals this to Tomcat by closing the connection. This results in the second Exception below when Tomcat is trying to read from a closed connection. The Apache logs would be the place to look for more information. > See bellow the stack traces: > > catalina.out: > 20.11.2009 10:22:29 org.apache.jk.core.MsgContext action > WARNUNG: Error sending end packet > java.net.SocketException: Broken pipe > at java.net.SocketOutputStream.socketWrite0(Native Method) > at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) > at java.net.SocketOutputStream.write(SocketOutputStream.java:136) > at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537) > at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127) > at org.apache.jk.core.MsgContext.action(MsgContext.java:305) > at org.apache.coyote.Response.action(Response.java:183) > at org.apache.coyote.Response.finish(Response.java:305) > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:205) > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) > at > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) > at > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) > at java.lang.Thread.run(Thread.java:595) > > application.log: > 2009-11-20 10:22:29,042 WARN [TP-Processor2] > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/customer] > - > Exception thrown whilst processing POSTed parameters > java.io.IOException > at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:205) > at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:179) > at org.apache.coyote.Request.doRead(Request.java:419) > at > org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:264) > at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403) > at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:279) > at > org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193) > at org.apache.catalina.connector.Request.readPostBody(Request.java:2420) > at > org.apache.catalina.connector.Request.parseParameters(Request.java:2399) > at org.apache.catalina.connector.Request.getParameter(Request.java:1005) > at > org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353) > at > COM.customer.foo.servlets.WrappedRequest.getParameter(WrappedRequest.java:134) > at > org.apache.wicket.protocol.http.servlet.ServletWebRequest.getParameter(ServletWebRequest.java:105) > at > org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:198) > at org.apache.wicket.Request.getRequestParameters(Request.java:171) > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1233) > at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353) > at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) > at > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355) > at > org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) > at > COM.customer.foo.servlets.AdaptiveEncodingFilter.doFilter(AdaptiveEncodingFilter.java:54) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) > at > COM.customer.foo.servlets.PerformanceMonitorFilter.doFilter(PerformanceMonitorFilter.java:60) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:548) > at > org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:420) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200) > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) > at > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) > at > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) > at java.lang.Thread.run(Thread.java:595) > > > > > > -- > View this message in context: > http://old.nabble.com/Problems-with-mod_proxy_ajp-and-Apache-2-tp26531167p26531167.html > Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org
发表评论
-
Java文件读写数据流
2012-08-30 20:30 3714数据流可分节点流( ... -
一次使用Eclipse Memory Analyzer分析Tomcat内存溢出
2012-04-16 19:59 25017前言在平时开发、测试过程中、甚至是生产环境中,有时会遇到Out ... -
apache2.2+tomcat超时503
2012-03-26 10:35 3417最近apache2.2+tomcat5.5.28(两个) ... -
JVM的参数设置的一个要点
2012-03-11 00:07 2549JVM参数的设置(特别是 –Xmx –Xms –Xmn ... -
【转载】理解Heap Profling名词-Shallow和Retained Sizes
2012-03-06 17:22 2908转载请注明原文链接:h ... -
更改eclipse author的默认名字(作者)
2011-09-07 12:39 1664在eclipse的目录下找到eclipse.in ... -
【转载】java.lang.OutOfMemoryError: PermGen space及其解决方法
2011-08-27 12:18 1242java.lang.OutOfMemoryError: P ... -
JAVA NIO
2011-08-19 22:25 705NIO流是一个比IO流(字节字符)效率高很多,因为是以块 ... -
XMLGregorianCalendar 与 Date 转换
2011-06-28 17:01 1927XMLGregorianCalendar 与 Date ... -
Web Service 的描述语言WSDL说明
2011-05-27 10:28 1203<?xml version="1. ... -
spring+quartz的配置文件
2011-05-26 21:23 1225spring+quartz的配置文件 &l ... -
JAVA调用Shell脚本--及阻塞的解决办法
2011-05-16 13:13 8829用java调用shell,使用 Process p=Runt ... -
WIN7安装WebSphere6.1
2011-03-23 12:55 0首先是安装,我们决定安装WebSphere6.1。 ... -
Jbpm4常用操作
2011-03-06 15:00 2643Jbpm4常用操作 一、ProcessEngine:流程 ... -
ThreadLocal
2010-11-08 21:40 854ThreadLocal -
小记--tomcat 常见问题
2010-10-12 22:29 11491. tomcat 6 undepl ... -
SimpleDateFormat用法说明
2010-09-19 13:02 1421关于java.text.SimpleDateFormat。 ... -
常用的jar包总结(4)
2010-08-13 12:34 1713最近用新的一套web框架做项目,有很多常用的包集成在里面。 ... -
常用的jar包总结(3)
2010-08-11 23:27 2050最近用新的一套web框架做项目,有很多常用的包集成在里面 ... -
常用的jar包总结(2)
2010-08-11 23:27 1896最近用新的一套web框架做项目,有很多常用的包集成在里面 ...
相关推荐
【标题】:“Tomcat+Apache集群配置实例” 在IT领域,服务器集群是一种常见的高可用性和负载均衡解决方案。这里我们将深入探讨如何配置一个基于Tomcat和Apache的集群环境,以提高Web应用的服务质量和应对高流量场景...
在构建高性能、高可用性的Web服务时,Apache与Tomcat的组合使用是非常常见的策略,尤其在需要实现负载平衡和集群的场景下。Apache通常作为前端服务器处理静态内容,而Tomcat则作为后端应用服务器处理动态请求。接...
【标题】"Tomcat+Apache+JK集群"指的是在Web服务器架构中,通过Apache HTTP Server与Tomcat应用服务器结合,并利用JK模块实现负载均衡和高可用性的集群部署方式。这种方式可以提升系统的性能和稳定性,应对高并发...
Apache Tomcat集群访问问题主要涉及的是在高并发或者负载均衡场景下,如何通过配置多个Tomcat实例来提高Web服务的可用性和性能。集群允许将请求分发到多个服务器上,从而实现负载均衡,并且提供了故障转移的能力,...
Apache + Tomcat 集群配置是指将 Apache 服务器与 Tomcat 服务器集成,以提高服务器的性能和可扩展性。本文将详细介绍如何配置 Apache + Tomcat 集群,包括安装 Apache 和 Tomcat 服务器、配置 mod_jk 模块、配置 ...
以下是对"tomcat .apache2.0集群配置资料"这一主题的详细说明。 **1. Tomcat集群的概念** Tomcat集群是指将多个独立的Tomcat实例通过负载均衡技术连接起来,共同处理来自客户端的请求。这种方式可以提升系统处理...
### Apache+Tomcat服务器集群配置详细步骤 #### 一、引言 在现代Web开发中,随着业务规模的不断扩大和用户需求的日益增长,单一服务器往往难以满足高性能、高可靠性的要求。为了应对这一挑战,通常采用Apache+...
### 最新的Tomcat与Apache整合集群优化 #### 一、Apache与Tomcat的整合 Apache与Tomcat的整合主要是为了实现动态内容与静态内容的有效分离,通过Apache作为前端的反向代理服务器,来处理静态资源的请求,而将动态...
基于Xen虚拟机实现Apache Tomcat集群搭建的知识点如下: 1. Xen虚拟机技术:Xen是一个开源的虚拟机监视器,允许用户在同一台物理主机上运行多个虚拟机,每个虚拟机可以运行不同的操作系统。Xen具有高性能和高扩展性...
2. **设置通信机制**:Tomcat集群通过通道(Channel)进行节点间的通信。常见的通信机制有基于TCP的`TcpChannel`,基于Multicast的`SimpleTcpCluster`等。你需要根据网络环境选择合适的通信方式,并在`Channel`元素...
在与Tomcat结合使用时,Apache可以接收来自用户的HTTP请求,然后根据预设策略将这些请求转发到后端的Tomcat服务器集群,以实现更高效的资源利用和故障转移。Apache可以通过模块如mod_proxy来实现这一功能。 接着,...
在IT领域,特别是Web服务架构中,通过使用Tomcat、Apache和JK代理模块实现集群与负载均衡是一种常见的优化策略,旨在提升系统性能、稳定性和可用性。以下是对标题“tomcat+apache+jk集群和负载均衡”以及描述...