This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Broken pipe - how to de-bug Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Broken pipe - how to de-bug" Watch "Broken pipe - how to de-bug" New topic

Broken pipe - how to de-bug

Greg Soulsby

Joined: Feb 01, 2011
Posts: 9
I am intermittently getting a "broken pipe" error, which I will paste below.

It is occurring intermittently, in a couple of places. In this case the line is a return from a function that finds a record in the database. Why a "broken pipe"? There is no connection to another web app, it is not an db error.

In another place it is where a RESTFul call is made to another web app, that web app intermittently has a broken pipe message when it goes to return. I can understand "broken pipe" in that context (although not what is causing it).

How do you de-bug this error?

Could it be caused by out of memory? I am running Probe to look at memory management and it is showing java is using
: non-heap = ps perm gen + code cache = very close to the 128 total meg available.
: heap space seem fine

SEVERE: Servlet.service() for servlet WebFlow Servlet threw exception Broken pipe
at Method)
at com.mysql.jdbc.MysqlIO.send(
at com.mysql.jdbc.MysqlIO.sendCommand(
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
at com.mysql.jdbc.ConnectionImpl.execSQL(
at com.mysql.jdbc.PreparedStatement.executeInternal(
at com.mysql.jdbc.PreparedStatement.executeQuery(
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(
at org.hibernate.jdbc.AbstractBatcher.getResultSet(
at org.hibernate.loader.Loader.getResultSet(
at org.hibernate.loader.Loader.doQuery(
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(
at org.hibernate.loader.Loader.doList(
at org.hibernate.loader.Loader.listIgnoreQueryCache(
at org.hibernate.loader.Loader.list(
at org.hibernate.loader.hql.QueryLoader.list(
at org.hibernate.hql.ast.QueryTranslatorImpl.list(
at org.hibernate.engine.query.HQLQueryPlan.performList(
at org.hibernate.impl.SessionImpl.list(
at org.hibernate.impl.QueryImpl.list(
at org.hibernate.ejb.QueryImpl.getSingleResult(
at xxx.find(
at xxx.find(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
at $Proxy111.findInnovCa
Rob Spoor

Joined: Oct 27, 2005
Posts: 19649

Greg Soulsby wrote:it is not an db error.

Not entirely true. The stack trace indicates that your code is trying to execute a query. The MySQL library is trying to send that query to the server, and it fails there. In other words, the communication between your web application and the database is not working properly.

How To Ask Questions How To Answer Questions
Greg Soulsby

Joined: Feb 01, 2011
Posts: 9
Ok, thanks Rob, thats helpful.

What should I go looking for as a root cause? Could it be memory?
I agree. Here's the link:
subject: Broken pipe - how to de-bug
Similar Threads
Getting communication Link failure on executing query
Problem to run my application
Broken pipe Error
getting "Problem with checked-in Statement, discarding " in servlet scheduler
Hibernate code not working on Linux Server