These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: c3p0 broken pipe mysql
PostPosted: Mon Aug 28, 2006 9:39 am 
Newbie

Joined: Tue Apr 18, 2006 9:57 am
Posts: 18
I have the c3p0 configuration for pool connections, but about 8 hours, the connections fail's, I configured like the manual of hibernate said when tomcat is used, in the page:

http://www.hibernate.org/114.html

and

http://www.hibernate.org/214.html


I have:
c3p0
mysql jConnectors: 3.1.13
autorecconnect.

the hibernate.cfg.xml is:


<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

<property name="connection.url">jdbc:mysql://localhost:3306/db?autoReconnect=true</property>

<property name="connection.username">test</property>
<property name="connection.password">test</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>

<!-- Use the C3P0 connection pool. -->
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">100</property> <!-- seconds -->
<property name="c3p0.max_size">100</property>
<property name="c3p0.max_statements">0</property>
<property name="c3p0.min_size">10</property>
<property name="c3p0.timeout">100</property>
<property name="c3p0.preferredTestQuery">SELECT 1</property>
<property name="c3p0.testConnectionOnCheckout">true</property>

<!-- Disable second-level cache. -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="cache.use_query_cache">false</property>
<property name="cache.use_minimal_puts">false</property>
<property name="max_fetch_depth">3</property>

<!-- Print SQL to stdout. -->
<property name="show_sql">false</property>
<property name="format_sql">false</property>


<!-- Bind the getCurrentSession() method to the thread. -->
<property name="current_session_context_class">thread</property>
<property name="hibernate.jdbc.use_scrollable_resultsets">false</property>



[b]Hibernate version:3.0

[b]Name and version of the database you are using: mysql 4.1

** 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:66)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2616)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2547)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1512)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2385)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2306)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1877)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 10, 2006 3:23 pm 
Beginner
Beginner

Joined: Thu May 06, 2004 5:30 am
Posts: 45
Sorry.. wrong topic!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.