• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Broken Pipe exceptions

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I'm working with a customized version of JForum - we changed a lot of the code. Recently we have been experiencing a weird bug - if the server is idle for a while (10-20 mins) we get a SocketException. We have tried to install a clean version (out of the box) of JForum, and here we experience the same bug.

Here is the dump
<!-- BEGIN ERROR STACK TRACE <br /> net.jforum.exceptions.ForumException: java.lang.reflect.InvocationTargetException <br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) <br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) <br /> at java.lang.reflect.Method.invoke(Method.java:585) <br /> at net.jforum.Command.process(Command.java:117) <br /> at net.jforum.JForum.processCommand(JForum.java:220) <br /> at net.jforum.JForum.service(JForum.java:203) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:92) <br /> at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106) <br /> at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) <br /> at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70) <br /> at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173) <br /> at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) <br /> at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:420) <br /> at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511) <br /> at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520) <br /> at com.caucho.util.ThreadPool.run(ThreadPool.java:442) <br /> at java.lang.Thread.run(Thread.java:595) <br /> Caused by: java.lang.reflect.InvocationTargetException <br /> ... 18 more <br /> Caused by: net.jforum.exceptions.DatabaseException: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Communications link failure due to underlying exception: <br /> <br /> ** BEGIN NESTED EXCEPTION ** <br /> <br /> java.net.SocketException <br /> MESSAGE: Broken pipe <br /> <br /> STACKTRACE: <br /> <br /> java.net.SocketException: Broken pipe <br /> at java.net.SocketOutputStream.socketWrite0(Native Method) <br /> at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) <br /> at java.net.SocketOutputStream.write(SocketOutputStream.java:136) <br /> at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) <br /> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) <br /> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2637) <br /> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554) <br /> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665) <br /> at com.mysql.jdbc.Connection.execSQL(Connection.java:3124) <br /> at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149) <br /> at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262) <br /> at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) <br /> at net.jforum.dao.generic.GenericForumDAO.selectAllIn24Order(GenericForumDAO.java:1028) <br /> at net.jforum.view.forum.ForumAction.list(ForumAction.java:120) <br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) <br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) <br /> at java.lang.reflect.Method.invoke(Method.java:585) <br /> at net.jforum.Command.process(Command.java:117) <br /> at net.jforum.JForum.processCommand(JForum.java:220) <br /> at net.jforum.JForum.service(JForum.java:203) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:92) <br /> at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106) <br /> at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) <br /> at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70) <br /> at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173) <br /> at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) <br /> at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:420) <br /> at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511) <br /> at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520) <br /> at com.caucho.util.ThreadPool.run(ThreadPool.java:442) <br /> at java.lang.Thread.run(Thread.java:595) <br /> <br /> <br /> ** END NESTED EXCEPTION ** <br /> <br /> <br /> <br /> Last packet sent to the server was 1 ms ago. <br /> <br /> Query being executed when exception was thrown: <br /> <br /> SELECT forum_id, forum_name, f.categories_id , forum_desc, forum_order, forum_topics, forum_last_post_id, f.moderated , vote_flash, video_title, video_desc, video_embed, interview_title , interview_desc, interview_mp3, image_title, image_flash, links_list , front_flash_title, front_flash_text FROM jforum_forums f INNER JOIN jforum_categories c ON f.categories_id = c.categories_id ORDER BY c.display_order, forum_order ASC <br /> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2652) <br /> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554) <br /> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665) <br /> at com.mysql.jdbc.Connection.execSQL(Connection.java:3124) <br /> at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149) <br /> at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262) <br /> at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) <br /> at net.jforum.dao.generic.GenericForumDAO.selectAllIn24Order(GenericForumDAO.java:1028) <br /> at net.jforum.view.forum.ForumAction.list(ForumAction.java:120) <br /> ... 18 more <br /> Caused by: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Communications link failure due to underlying exception: <br /> <br /> ** BEGIN NESTED EXCEPTION ** <br /> <br /> java.net.SocketException <br /> MESSAGE: Broken pipe <br /> <br /> STACKTRACE: <br /> <br /> java.net.SocketException: Broken pipe <br /> at java.net.SocketOutputStream.socketWrite0(Native Method) <br /> at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) <br /> at java.net.SocketOutputStream.write(SocketOutputStream.java:136) <br /> at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) <br /> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) <br /> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2637) <br /> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554) <br /> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665) <br /> at com.mysql.jdbc.Connection.execSQL(Connection.java:3124) <br /> at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149) <br /> at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262) <br /> at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) <br /> at net.jforum.dao.generic.GenericForumDAO.selectAllIn24Order(GenericForumDAO.java:1028) <br /> at net.jforum.view.forum.ForumAction.list(ForumAction.java:120) <br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) <br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) <br /> at java.lang.reflect.Method.invoke(Method.java:585) <br /> at net.jforum.Command.process(Command.java:117) <br /> at net.jforum.JForum.processCommand(JForum.java:220) <br /> at net.jforum.JForum.service(JForum.java:203) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:92) <br /> at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106) <br /> at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) <br /> at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70) <br /> at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173) <br /> at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) <br /> at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:420) <br /> at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511) <br /> at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520) <br /> at com.caucho.util.ThreadPool.run(ThreadPool.java:442) <br /> at java.lang.Thread.run(Thread.java:595) <br /> <br /> <br /> ** END NESTED EXCEPTION ** <br /> <br /> <br /> <br /> Last packet sent to the server was 1 ms ago. <br /> <br /> Query being executed when exception was thrown: <br /> <br /> SELECT forum_id, forum_name, f.categories_id , forum_desc, forum_order, forum_topics, forum_last_post_id, f.moderated , vote_flash, video_title, video_desc, video_embed, interview_title , interview_desc, interview_mp3, image_title, image_flash, links_list , front_flash_title, front_flash_text FROM jforum_forums f INNER JOIN jforum_categories c ON f.categories_id = c.categories_id ORDER BY c.display_order, forum_order ASC <br /> ... 27 more <br /> <br /> END ERROR STACK TRACE-->

We suspect that there might be some issues with our mysql connection.

The error disappears if the browser is refreshed, so it's only a bug that lives when the serve has been idle for a while.
[originally posted on jforum.net by dodger042]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I expect that the connection gets closed without the pool knowing about it.

Would it help to decrease the property
database.ping.delay = 3600
to something like
database.ping.delay = 300
?
[originally posted on jforum.net by dodger042]
 
Grow your own food... or this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic