You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Dennis Bekkering <dj...@gmail.com> on 2006/01/03 23:31:55 UTC

broken pipe?

Hello,

I suddenly out of the blue get the following trace. It happens sometimes not
all the time. Does anybody knows what this means. And what can be done about
it?

rethrown as org.apache.ojb.broker.PersistenceBrokerSQLException:
Communications link failure due to underlying exception: ** BEGIN NESTED
EXCEPTION ** java.net.SocketException MESSAGE: Broken pipe STACKTRACE:
java.net.SocketException: Broken pipe at
java.net.SocketOutputStream.socketWrite0(Native Method) at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at
java.net.SocketOutputStream.write(SocketOutputStream.java:136) at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) at
com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2618) at
com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2549) at
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1512) at
com.mysql.jdbc.ServerPreparedStatement.serverPrepare(
ServerPreparedStatement.java:1485) at com.mysql.jdbc.ServerPreparedStatement
.<init>(ServerPreparedStatement.java:151) at
com.mysql.jdbc.Connection.prepareStatement(Connection.java:1309) at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatement(Unknown
Source) at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatement(Unknown
Source) at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt(Unknown
Source) at
org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(Unknown
Source) at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown
Source) at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown
Source) at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown
Source) at org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(Unknown
Source) at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unknown
Source) at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Unknown
Source) at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown
Source) at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown
Source) at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown
Source) at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown
Source) at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown
Source) at
org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl.loadData(Unknown
Source) at org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl.loadData(Unknown
Source) at
org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl.getData(Unknown
Source) at
org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl.toArray(Unknown
Source) at java.util.Collections.sort(Collections.java:158) at
com.myvision.gui.datatable.WebSiteViewer.constructBaseComponentFromModel(
WebSiteViewer.java:233) at
com.myvision.gui.datatable.WebSiteViewer.constructBaseComponentFromModel(
WebSiteViewer.java:107) at com.myvision.gui.BaseComponent.add(
BaseComponent.java:1510) at
com.myvision.control.DynamicApplication.setHtmlContent(
DynamicApplication.java:48) at
com.myvision.render.HtmlRenderer.setApplicationContent(HtmlRenderer.java:20)
at com.myvision.gui.application.Application.setContent(Application.java:272)
at com.myvision.control.ApplicationServer.initApplication(
ApplicationServer.java:415) at com.myvision.control.ApplicationServer.doGet(
ApplicationServer.java:131) at javax.servlet.http.HttpServlet.service(
HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(
HttpServlet.java:802) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173) at
org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:672) at
org.apache.catalina.core.ApplicationDispatcher.processRequest(
ApplicationDispatcher.java:463) at
org.apache.catalina.core.ApplicationDispatcher.doForward(
ApplicationDispatcher.java:398) at
org.apache.catalina.core.ApplicationDispatcher.forward(
ApplicationDispatcher.java:301) at
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:43) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173) at
org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213) at
org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
(Http11Protocol.java:744) at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527) at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80) at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)

--
mvg,
Dennis

Re: broken pipe?

Posted by Dennis Bekkering <dj...@gmail.com>.
After updating all my libraries , using 1.0.4 ,use of
autoReconnect=true and jdbc level 3, I dont get the broken pipe
exception anymore. I dont know exactly what did the trick but it is OK
now. pweeeh!

2006/1/10, Dennis Bekkering <dj...@gmail.com>:
> everything is on 1.0.4 now. I also updated all my other libraries with the
> latest. The jdbc level is 3, lets wait and see. If it still fails I will
> have to modify the pool class(es) I guess.
>
>  2006/1/9, Dennis Bekkering <dj...@gmail.com>:
> > my driver was and is
> mysql-connector-java-3.1.5-gamma-bin.jar so I updated to
> jdbc level 3. Will update to 1.0.3 tonight if lazy is still lazy.
> >
> >
> > 2006/1/9, Thomas Dudziak <to...@gmail.com>:
> >
> > > On 1/9/06, Dennis Bekkering <dj...@gmail.com> wrote:
> > >
> > > > The whole thing looks like this now, I don't use 1.0.4 though on
> production.
> > > > Does the attribute do anything then. It runs on rc7.
> > >
> > > The custom attribute is new in 1.0.4, so it won't do anyting in older
> versions.
> > > I'd suggest you first update to 1.0.3 (there shouldn't have been too
> > > many changes regarding lazy loading) and see how that works.
> > > Btw, you should use jdbc level 3 for the mysql driver, and update to
> > > the newest driver (3.1), there have been a lot of changes AFAIK.
> > >
> > > Tom
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> ojb-user-unsubscribe@db.apache.org
> > > For additional commands, e-mail: ojb-user-help@db.apache.org
> > >
> > >
> >
> >
> >
> > --
> > mvg,
> > Dennis
>
>
>
> --
> mvg,
> Dennis


--
mvg,
Dennis

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: broken pipe?

Posted by Dennis Bekkering <dj...@gmail.com>.
everything is on 1.0.4 now. I also updated all my other libraries with the
latest. The jdbc level is 3, lets wait and see. If it still fails I will
have to modify the pool class(es) I guess.

2006/1/9, Dennis Bekkering <dj...@gmail.com>:
>
> my driver was and is mysql-connector-java-3.1.5-gamma-bin.jar so I updated
> to jdbc level 3. Will update to 1.0.3 tonight if lazy is still lazy.
>
> 2006/1/9, Thomas Dudziak <to...@gmail.com>:
> >
> > On 1/9/06, Dennis Bekkering <dj...@gmail.com> wrote:
> >
> > > The whole thing looks like this now, I don't use 1.0.4 though on
> > production.
> > > Does the attribute do anything then. It runs on rc7.
> >
> > The custom attribute is new in 1.0.4, so it won't do anyting in older
> > versions.
> > I'd suggest you first update to 1.0.3 (there shouldn't have been too
> > many changes regarding lazy loading) and see how that works.
> > Btw, you should use jdbc level 3 for the mysql driver, and update to
> > the newest driver (3.1), there have been a lot of changes AFAIK.
> >
> > Tom
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
>
>
> --
> mvg,
> Dennis




--
mvg,
Dennis

Re: broken pipe?

Posted by Dennis Bekkering <dj...@gmail.com>.
my driver was and is mysql-connector-java-3.1.5-gamma-bin.jar so I updated
to jdbc level 3. Will update to 1.0.3 tonight if lazy is still lazy.

2006/1/9, Thomas Dudziak <to...@gmail.com>:
>
> On 1/9/06, Dennis Bekkering <dj...@gmail.com> wrote:
>
> > The whole thing looks like this now, I don't use 1.0.4 though on
> production.
> > Does the attribute do anything then. It runs on rc7.
>
> The custom attribute is new in 1.0.4, so it won't do anyting in older
> versions.
> I'd suggest you first update to 1.0.3 (there shouldn't have been too
> many changes regarding lazy loading) and see how that works.
> Btw, you should use jdbc level 3 for the mysql driver, and update to
> the newest driver (3.1), there have been a lot of changes AFAIK.
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>


--
mvg,
Dennis

Re: broken pipe?

Posted by Thomas Dudziak <to...@gmail.com>.
On 1/9/06, Dennis Bekkering <dj...@gmail.com> wrote:

> The whole thing looks like this now, I don't use 1.0.4 though on production.
> Does the attribute do anything then. It runs on rc7.

The custom attribute is new in 1.0.4, so it won't do anyting in older versions.
I'd suggest you first update to 1.0.3 (there shouldn't have been too
many changes regarding lazy loading) and see how that works.
Btw, you should use jdbc level 3 for the mysql driver, and update to
the newest driver (3.1), there have been a lot of changes AFAIK.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: broken pipe?

Posted by Dennis Bekkering <dj...@gmail.com>.
Thom,

The whole thing looks like this now, I don't use 1.0.4 though on production.
Does the attribute do anything then. It runs on rc7.

thanks,


    <!-- this connection was used as the default one within OJB -->
    <jdbc-connection-descriptor
           jcd-alias="databaseMySQL"
           default-connection="true"
           platform="MySQL"
           jdbc-level="2.0"
           driver="com.mysql.jdbc.Driver"
           protocol="jdbc"
           subprotocol="mysql"
           dbalias="//****************"
           username="*************"
           password="*****************"
            eager-release="false"
           batch-mode="false"
          useAutoCommit="1"
        ignoreAutoCommitExceptions="false"
     >

    <attribute attribute-name="initializationCheck"
        attribute-value="true" />

        <connection-pool
            maxActive="21"
            minIdle="0"
            maxIdle="-1"
            maxWait="2000"
            minEvictableIdleTimeMillis="900000"
            numTestsPerEvictionRun="21"
            testWhileIdle="true"
            testOnBorrow="true"
            testOnReturn="true"
            validationQuery="SELECT 1"
            timeBetweenEvictionRunsMillis="900000"
            removeAbandoned="true"
            removeAbandonedTimeout="900000"
            whenExhaustedAction="2"
        />

        <sequence-manager className="
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
            <attribute attribute-name="grabSize" attribute-value="20"/>
            <attribute attribute-name="autoNaming" attribute-value="true"/>
            <attribute attribute-name="globalSequenceId"
attribute-value="false"/>
            <attribute attribute-name="globalSequenceStart"
attribute-value="10000"/>
        </sequence-manager>


   </jdbc-connection-descriptor>


2006/1/9, Thomas Dudziak <to...@gmail.com>:
>
> On 1/9/06, Dennis Bekkering <dj...@gmail.com> wrote:
> > wel that didn't help now it looks like this and that still doesn't help.
> > What do I have to do? My customers go crazy over this and me too!!! I
> really
> > don't know what to do anymore. On production I didn't switch to
> > 1.0.4because lazy loading is different and the site gets to slow then.
>
> Please try the custom initializationCheck attribute that I wrote about
> earlier:
>
> http://db.apache.org/ojb/docu/guides/repository.html#Attributes-N10127
>
> You could also write a minimalistic JDBC test that simply runs over
> night and performs the SELECT 1 every second or so, in order to test
> whether you have some MySql setup problem.
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>


--
mvg,
Dennis

Re: broken pipe?

Posted by Thomas Dudziak <to...@gmail.com>.
On 1/9/06, Dennis Bekkering <dj...@gmail.com> wrote:
> wel that didn't help now it looks like this and that still doesn't help.
> What do I have to do? My customers go crazy over this and me too!!! I really
> don't know what to do anymore. On production I didn't switch to
> 1.0.4because lazy loading is different and the site gets to slow then.

Please try the custom initializationCheck attribute that I wrote about earlier:

http://db.apache.org/ojb/docu/guides/repository.html#Attributes-N10127

You could also write a minimalistic JDBC test that simply runs over
night and performs the SELECT 1 every second or so, in order to test
whether you have some MySql setup problem.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: broken pipe?

Posted by Dennis Bekkering <dj...@gmail.com>.
wel that didn't help now it looks like this and that still doesn't help.
What do I have to do? My customers go crazy over this and me too!!! I really
don't know what to do anymore. On production I didn't switch to
1.0.4because lazy loading is different and the site gets to slow then.

        <connection-pool
            maxActive="21"
            minIdle="0"
            maxIdle="-1"
            maxWait="2000"
            minEvictableIdleTimeMillis="900000"
            numTestsPerEvictionRun="21"
            testWhileIdle="true"
            testOnBorrow="true"
            testOnReturn="true"
            validationQuery="SELECT 1"
            timeBetweenEvictionRunsMillis="900000"
            removeAbandoned="true"
            removeAbandonedTimeout="900000"
            whenExhaustedAction="2">



2006/1/6, Dennis Bekkering <dj...@gmail.com>:
>
> i added
>             testOnBorrow="true"
>             validationQuery="SELECT 1"
>
> to the descriptor, I'l wait and see what happens.
>
> Dennis
>

Re: broken pipe?

Posted by Dennis Bekkering <dj...@gmail.com>.
i added
            testOnBorrow="true"
            validationQuery="SELECT 1"

to the descriptor, I'l wait and see what happens.

Dennis

2006/1/5, Thomas Dudziak <to...@gmail.com>:
>
> On 1/5/06, Dennis Bekkering <dj...@gmail.com> wrote:
>
> > I asked my provider and they didn't change anything. They pointed out
> the
> > possible absence of autoReconnect=true in my JDBC url. Does anybody
> knows if
> > that might help. I'd rather have that than a ping query for every call.
>
> Hmm, autoReconnect = true might be ignored by the MySql driver when
> autoCommit is set to false for a transaction (e.g.
> http://lists.mysql.com/java/4928).
> This might be the case as the OJB doc for 1.0.4 suggests for your
> setting of useAutoCommit = 1:
>
> http://db.apache.org/ojb/docu/guides/repository.html#Attributes-N10127
>
> You could try to set the custom attribute initializationCheck to true
> (as the above link suggests).
> Btw, I think (though I'm not sure) that the validation query is only
> used when a connection is retrieved from the connection pool. You
> could configrue one and check with P6Spy.
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>


--
mvg,
Dennis

Re: broken pipe?

Posted by Thomas Dudziak <to...@gmail.com>.
On 1/5/06, Dennis Bekkering <dj...@gmail.com> wrote:

> I asked my provider and they didn't change anything. They pointed out the
> possible absence of autoReconnect=true in my JDBC url. Does anybody knows if
> that might help. I'd rather have that than a ping query for every call.

Hmm, autoReconnect = true might be ignored by the MySql driver when
autoCommit is set to false for a transaction (e.g.
http://lists.mysql.com/java/4928).
This might be the case as the OJB doc for 1.0.4 suggests for your
setting of useAutoCommit = 1:

http://db.apache.org/ojb/docu/guides/repository.html#Attributes-N10127

You could try to set the custom attribute initializationCheck to true
(as the above link suggests).
Btw, I think (though I'm not sure) that the validation query is only
used when a connection is retrieved from the connection pool. You
could configrue one and check with P6Spy.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: broken pipe?

Posted by Dennis Bekkering <dj...@gmail.com>.
I asked my provider and they didn't change anything. They pointed out the
possible absence of autoReconnect=true in my JDBC url. Does anybody knows if
that might help. I'd rather have that than a ping query for every call.

Thanks,
Dennis

2006/1/4, Dennis Bekkering <dj...@gmail.com>:
>
> Thomas,
>
> I'v been using OJB for years now and it is the first time that I get it.
> Maybe my provider changed something, i will check that out. My descriptor
> looks like this for quite a while now :
>

Re: broken pipe?

Posted by Dennis Bekkering <dj...@gmail.com>.
Thomas,

I'v been using OJB for years now and it is the first time that I get it.
Maybe my provider changed something, i will check that out. My descriptor
looks like this for quite a while now :

    <!-- this connection was used as the default one within OJB -->
    <jdbc-connection-descriptor
           jcd-alias="databaseMySQL"
           default-connection="true"
           platform="MySQL"
           jdbc-level="2.0"
           driver="com.mysql.jdbc.Driver"
           protocol="jdbc"
           subprotocol="mysql"
           dbalias="//localhost/***********"
           username="root"
           password="root"
        eager-release="false"
           batch-mode="false"
        useAutoCommit="1"
        ignoreAutoCommitExceptions="false"
     >

        <connection-pool
            maxActive="21"
            minEvictableIdleTimeMillis="3600000"
            numTestsPerEvictionRun="21"
            testWhileIdle="true"
            timeBetweenEvictionRunsMillis="3600000"
            whenExhaustedAction="2"
        />

        <sequence-manager className="
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
            <attribute attribute-name="grabSize" attribute-value="20"/>
            <attribute attribute-name="autoNaming" attribute-value="true"/>
            <attribute attribute-name="globalSequenceId"
attribute-value="false"/>
            <attribute attribute-name="globalSequenceStart"
attribute-value="10000"/>
        </sequence-manager>


   </jdbc-connection-descriptor>

Re: broken pipe?

Posted by Thomas Dudziak <to...@gmail.com>.
On 1/3/06, Dennis Bekkering <dj...@gmail.com> wrote:
> Hello,
>
> I suddenly out of the blue get the following trace. It happens sometimes not
> all the time. Does anybody knows what this means. And what can be done about
> it?
>
> rethrown as org.apache.ojb.broker.PersistenceBrokerSQLException:
> Communications link failure due to underlying exception: ** BEGIN NESTED
> EXCEPTION ** java.net.SocketException MESSAGE: Broken pipe STACKTRACE:
> java.net.SocketException: Broken pipe at
> java.net.SocketOutputStream.socketWrite0(Native Method) at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at
> java.net.SocketOutputStream.write(SocketOutputStream.java:136) at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at
> java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) at
> com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2618) at

This is a common MySql error that has to do with TCP/IP timeouts. See e.g. here

http://forums.mysql.com/read.php?39,42763,42767#msg-42767

What does your jdbc connection descriptor look like ?

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org