Saturday, December 26, 2009

IOException: Broken pipe Broken pipe

In Client server application, Message send from/to. If message size is less than 10MB, then we would have not faced any issues. Since most of the application/web server comes with default configuration for message size to 10MB or more.

Usecase : upload a zip file from client to server

In server side, any of the endpoints like Servlet(http), EJB, JMS, or TCP, has to be established to receive message as byte array or byte array holding java objects. Stream objects can not be serialized, it has to be stored as byte and trasmitted. While marshalling and unmarshalling byte array object, Heap usage go to the peak. In this time, we may get OutOfMemoryException

In Client Side, InputStream created to read data from file and convert into byte array.

If server receives message more than the size configured then server will throw weblogic.socket.MaxMessageSizeExceededException

<ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <> <1229479358244> 
<BEA-000403> <IOException occurred on socket: Socket[addr=/,port=281 30,localport=8001] 
weblogic.socket.MaxMessageSizeExceededException: Incoming message of size: '10000080' bytes 
exceeds the configured maximumof: '10000000' bytes for protocol: 't3'.>
at weblogic.socket.BaseAbstractMuxableSocket.incrementBufferOffset(
at weblogic.rjvm.t3.MuxableSocketT3.incrementBufferOffset(
at weblogic.socket.SocketMuxer.readReadySocketOnce(
at weblogic.socket.SocketMuxer.readReadySocket(
at weblogic.socket.JavaSocketMuxer.processSockets(
at weblogic.kernel.ExecuteThread.execute(

If server receives message even with in the limit, but while unmarshalling data, application exceeds heap size, then server will drop the connection established with client abrubtly with OutOfMemoryException. Since connection got closed then we do get IOException as below. Broken pipe
at Method)

Note:Broken pipe message comes for anytime stream could not able to write/read data from file(socket). In general, heart beat will be delivered by server/client in stipulated format. If this max number of attempts cross then application assumes that socket is closed by other party and throws this exception.


In weblogic server console or config xml, we can set maximum message size only to the http protocol or t3 or all the protocols.

Environment > servers > soa_server > protocols > General > change Maximum Message Size as below

The above code set 100mb for these properties. These configuration helps to intimate the server that maximum message of receiving capacity. There is no configuration required to be configured to send message from server.

What about client side, to receive 100 mb message?

Yes, we have to set weblogic.MaxMessageSize config property in commandline.


Refer this link supported maximum message size in weblogic

No comments:

Post a Comment

Recent Posts

Unix Commands | List all My Posts


This blog intended to share the knowledge and contribute to JAVA Community such a way that by providing samples and pointing right documents/webpages. We try to give our knowledege level best and no guarantee can be claimed on truth. Copyright and Terms of Policy refer