Re: Tomcat5.5 MySQL14.12 java.net.SocketException: Broken pipe
It has been 10 days so I am declaring that Jason's suggestion did indeed solve the problem. Thanks Jason. - Original Message - From: Steve Ryder sry...@jsrsys.com To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, October 07, 2010 10:03 AM Subject: Re: Tomcat5.5 MySQL14.12 java.net.SocketException: Broken pipe Thanks Jason. I have added the two parameters. Hopefully I will have seen the last of this error. - Original Message - From: Jason Britton jbritto...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, October 06, 2010 11:57 PM Subject: Re: Tomcat5.5 MySQL14.12 java.net.SocketException: Broken pipe To your mysql Resource definition below I would add validationQuery=SELECT 1 That should prevent your application from getting handed stale db connections from your pool. Take a look at the testOnBorrow and validationQuery definitions here http://commons.apache.org/dbcp/configuration.html Jason On Wed, Oct 6, 2010 at 8:18 PM, Steve Ryder sry...@jsrsys.com wrote: I am getting this during mysql connection (about once a week). I have read the thread on MySQL forum, which has a solution, but the link to the solution is broken and points back to the same page. Suggestions have been use autoconnect=true Another was that the server timeout was shorter than the connection time-out. I have the following: In server.xml: Connector port=80 maxHttpHeaderSize=8192 maxThreads=192 minSpareThreads=32 maxSpareThreads=128 enableLookups=false redirectPort=8443 acceptCount=128 connectionTimeout=2 disableUploadTimeout=true / In context.xml Resource name=jdbc/MySql auth=Container type=javax.sql.DataSource url=jdbc:mysql://localhost.localdomain/rsa?autoReconnect=true factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=com.mysql.jdbc.Driver password=jsrsys username=jsrsys maxWait=1 maxActive=200 maxIdle=5 removeAbandoned=true removeAbandonedTimeout=300 logAbandoned=true / Note that maxWait is 1/2 of connectionTimeout and I have autoReconnect=true. Any ideas. This is low priority as users are able to reconnect by just pressing Refresh, but I would like this to go away. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat5.5 MySQL14.12 java.net.SocketException: Broken pipe
Thanks Jason. I have added the two parameters. Hopefully I will have seen the last of this error. - Original Message - From: Jason Britton jbritto...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, October 06, 2010 11:57 PM Subject: Re: Tomcat5.5 MySQL14.12 java.net.SocketException: Broken pipe To your mysql Resource definition below I would add validationQuery=SELECT 1 That should prevent your application from getting handed stale db connections from your pool. Take a look at the testOnBorrow and validationQuery definitions here http://commons.apache.org/dbcp/configuration.html Jason On Wed, Oct 6, 2010 at 8:18 PM, Steve Ryder sry...@jsrsys.com wrote: I am getting this during mysql connection (about once a week). I have read the thread on MySQL forum, which has a solution, but the link to the solution is broken and points back to the same page. Suggestions have been use autoconnect=true Another was that the server timeout was shorter than the connection time-out. I have the following: In server.xml: Connector port=80 maxHttpHeaderSize=8192 maxThreads=192 minSpareThreads=32 maxSpareThreads=128 enableLookups=false redirectPort=8443 acceptCount=128 connectionTimeout=2 disableUploadTimeout=true / In context.xml Resource name=jdbc/MySql auth=Container type=javax.sql.DataSource url=jdbc:mysql://localhost.localdomain/rsa?autoReconnect=true factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=com.mysql.jdbc.Driver password=jsrsys username=jsrsys maxWait=1 maxActive=200 maxIdle=5 removeAbandoned=true removeAbandonedTimeout=300 logAbandoned=true / Note that maxWait is 1/2 of connectionTimeout and I have autoReconnect=true. Any ideas. This is low priority as users are able to reconnect by just pressing Refresh, but I would like this to go away. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat5.5 MySQL14.12 java.net.SocketException: Broken pipe
I am getting this during mysql connection (about once a week). I have read the thread on MySQL forum, which has a solution, but the link to the solution is broken and points back to the same page. Suggestions have been use autoconnect=true Another was that the server timeout was shorter than the connection time-out. I have the following: In server.xml: Connector port=80 maxHttpHeaderSize=8192 maxThreads=192 minSpareThreads=32 maxSpareThreads=128 enableLookups=false redirectPort=8443 acceptCount=128 connectionTimeout=2 disableUploadTimeout=true / In context.xml Resource name=jdbc/MySql auth=Container type=javax.sql.DataSource url=jdbc:mysql://localhost.localdomain/rsa?autoReconnect=true factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=com.mysql.jdbc.Driver password=jsrsys username=jsrsys maxWait=1 maxActive=200 maxIdle=5 removeAbandoned=true removeAbandonedTimeout=300 logAbandoned=true / Note that maxWait is 1/2 of connectionTimeout and I have autoReconnect=true. Any ideas. This is low priority as users are able to reconnect by just pressing Refresh, but I would like this to go away. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat5.5 MySQL14.12 java.net.SocketException: Broken pipe
To your mysql Resource definition below I would add validationQuery=SELECT 1 That should prevent your application from getting handed stale db connections from your pool. Take a look at the testOnBorrow and validationQuery definitions here http://commons.apache.org/dbcp/configuration.html Jason On Wed, Oct 6, 2010 at 8:18 PM, Steve Ryder sry...@jsrsys.com wrote: I am getting this during mysql connection (about once a week). I have read the thread on MySQL forum, which has a solution, but the link to the solution is broken and points back to the same page. Suggestions have been use autoconnect=true Another was that the server timeout was shorter than the connection time-out. I have the following: In server.xml: Connector port=80 maxHttpHeaderSize=8192 maxThreads=192 minSpareThreads=32 maxSpareThreads=128 enableLookups=false redirectPort=8443 acceptCount=128 connectionTimeout=2 disableUploadTimeout=true / In context.xml Resource name=jdbc/MySql auth=Container type=javax.sql.DataSource url=jdbc:mysql://localhost.localdomain/rsa?autoReconnect=true factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=com.mysql.jdbc.Driver password=jsrsys username=jsrsys maxWait=1 maxActive=200 maxIdle=5 removeAbandoned=true removeAbandonedTimeout=300 logAbandoned=true / Note that maxWait is 1/2 of connectionTimeout and I have autoReconnect=true. Any ideas. This is low priority as users are able to reconnect by just pressing Refresh, but I would like this to go away. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org