aspose file tools*
The moose likes JDBC and the fly likes Broken Pipe message in DB2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Broken Pipe message in DB2" Watch "Broken Pipe message in DB2" New topic
Author

Broken Pipe message in DB2

Paul Frey
Greenhorn

Joined: Apr 25, 2002
Posts: 19
Periodically, we have been receiving an IOException using the HIT JDBC DB2 driver HIT SW with a DB2 database connection. The message associated with IOException references a "Broken pipe". I know from my socket programming background that a broken pipe message is normally encountered when the server severs the socket connection to the client. However, the database adminstrators (at a remote location) are not seeing any problems at their end. One other piece of information, this appears to only be happening in our WebLogic 6.1 environment (at least that's the only place we've seen it happen). We have connetion pools continually being tested to ensure that they are valid (this is the reserved pool setting in WebLogic). The other item we noticed was that after a weekend of no user activity, the broken pipe message is the first thing users encounter if there is a call to a DB2 stored procedure. But then the problem appears to go away. Also, the Broken pipe message is only happening on DB2 stored procedures and these same procedures are functioning fine the majority of the time.
Has anyone out there encountered something similar to this?
Thanks,
Paul Frey
Senthil B Kumar
Ranch Hand

Joined: Feb 09, 2004
Posts: 140
Hi,
we had our J2EE App running in WLS6.1 & Oracle 8.1 , we suddenly once got the Io Exception Broken Pipe error when our java utilities were trying to execute Stored Procedures in Oracle.

we were also using Connection Pools in WLS.


Till now i havent encountered a proper solution for this. but the reasons could be

a) The App Server Disk may be full and so the jsp's cant be compiled to servlets.

b) The Database Connection would have gone down suddenly.

c) The Pool has multiple connections, and due to timeout or any other reason, one of the connection would go dead but the application server is still trying to use the dead connection to connect and execute the Stored Procedure, and hence getting a broken pipe error.

if anyone could have more reasons or any solutions, its welcome.


Work like you don't need the money. Love like you've never been hated. Dance like nobody's watching. Sing like nobody's listening. Live like it's Heaven on Earth.
Currently I Reside Here WEBlog
Boon Subra
Ranch Hand

Joined: Jul 18, 2001
Posts: 69
Hi ,

I too got "Broken Pipe" error when the system was under test with Mysql.

If no body accessed the site say the whole night,in the morning it would say Broken Pipe error.


This was solved temprorarily by:

writing/running a servlet to access a dummy table every 1 hr/ 2 hrs depending on the requirement. So there was no timeout.
And the connection persisted.

I donno if this could a solution for your too.

Bye,
Bhuvana
Sridhar Srikanthan
Ranch Hand

Joined: Jan 08, 2003
Posts: 366
Originally posted by kolkata prince:

c) The Pool has multiple connections, and due to timeout or any other reason, one of the connection would go dead but the application server is still trying to use the dead connection to connect and execute the Stored Procedure, and hence getting a broken pipe error.

if anyone could have more reasons or any solutions, its welcome.


This was exactly the reason why we got Broken Pipe Exception. We accidentally set the inactive connection timeout for the connection pool in weblogic 8.1 as 10 seconds.

According to the published functionality, weblogic is supposed to return the connection object back to the pool but it wouldn't do so and from hear-say , I need to install a new patch (since weblogic acknowledged that its a bug).

The temporary working solution is to change the inactive timeout to zero and that works like a charm !!!

We have seen this problem far too often and no one seems to know the exact reason. I hope this explanation adds on to Kolkata Prince's initiative.

Thanks
Sridhar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Broken Pipe message in DB2