mysql锁与brokenpipe_「broken」服务器遇到BrokenPipe崩
溃之异。。。
broken
application identity问题描述:linux+jdk1.7+Tomcat7+mysql部署的WEB项⽬,线上时常抛出该异常(⽂章底部有解决⽅案)。
org.tor.ClientAbortException: java.socketException: broken pipeat
org.alWriteBytes(OutputBuffer.java:410)
at at.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
at at.util.buf.ByteChunk.APPend(ByteChunk.java:366)
at org.tor.OutputBuffer.writeBytes(OutputBuffer.java:435)
at org.tor.OutputBuffer.write(OutputBuffer.java:423)
at org.tor.Coyoteoutputstream.write(CoyoteOutputStream.java:91)
at com.json.UTF8JsonGenerator._flushBuffer(UTF8JsonGenerator.java:2033)
at com.json.UTF8JsonGenerator._writeNull(UTF8JsonGenerator.java:1997)
at com.json.UTF8JsonGenerator.writeNull(UTF8JsonGenerator.java:989)
at com.fasterxml.jackson.databind.ser.std.Nullserializer.serialize(NullSerializer.java:30)
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsfield(BeanPropertyWriter.java:660)
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializecontents(IndexedListSerializer.java:119)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693)
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155)
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693)
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:292)
at com.fasterxml.jackson.databind.ObjectWriter$prefetch.serialize(ObjectWriter.java:1419)
at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:940)
at
org.verter.json.AbstractJackson2HttpmessageConverter.writeInternal(AbstractJackson2HttpMessageCo
at
org.verter.AbstractGenericHttpMessageConverter.write(AbstractGenericHttpMessageConverter.java:106)
at
org.springframework.web.hod.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverter
at
org.springframework.web.questresponseBodyMethodProcessor.handlereturnValue(RequestRespo
at
org.hod.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturn
at
org.springframework.web.hod.annotation.ServletInvocableHandlermethod.invokeAndHandle(ServletInvocableHandle
at
critical structureorg.springframework.web.hod.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingH
at
org.springframework.web.hod.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerA
at
org.springframework.web.hod.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at at.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.StandardwrapperValve.invoke(StandardWrapperValve.java:218)
at org.StandardcontextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
at org.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ERRORReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
at org.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.tor.CoyoteAdapter.service(CoyoteAdapter.java:445)
at http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
at AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at at.util.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
安装mysql时默认的用户名是at urrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at urrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
localstorage使用at at.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.SocketException: Broken pipe
at java.SocketOutputStream.socketWrite0(Native Method)
at java.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
at java.SocketOutputStream.write(SocketOutputStream.java:159)
at alWriteBytes(InternalOutputBuffer.java:216)
at at.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
at at.util.buf.ByteChunk.append(ByteChunk.java:366)
at http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:239) at http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:93)
at http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:192)
at Response.doWrite(Response.java:499)
at org.alWriteBytes(OutputBuffer.java:405)
... 67 more
什么叫多线程处理工作问题分析:
1、报⽂过⼤:处理的报⽂过⼤,导致客户的端⽆法解析报⽂。
2、⽂件过⼤:处理时间过长,由于执⾏时间较长或频率较⾼,程序或服务器出发超时直接结束进程。
3、重复提交:处理时间过长导致当客户端重复发送请求,⽽上次请求尚未完成,下次请求会close上次请求。mysql无法连接到服务器
4、数据库配置问题:mysql配置⽂件忘记配置wait_timeout参数,导致数据库连接顺序关闭(RS、PS、CONN)。
5、另外就是:java虚拟机内存太⼩或者使⽤低版本的JVM,出发垃圾回收。
以上,我⼀个个过了下代码和配置,最终发现是第四点的问题,配置了mysql后就解决了。
相关阅读
注:pipe函数创建⽆名管道1、pipe函数读阻塞#include #include int main(){int fd[2];int ret;char read_bu
很多朋友问我博客⼀个RSS地址怎么有三个博客的内容的,其实我⽤的就是Yahoo Pipes⼯具,这个⼯具很早就出现了,。聚合RSS的好处有很多,
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论