Hibernate's internal connection pooling isn't meant for production
because it does things just like that.
Suggest you use c3p0 for the pooling.
>From my hibernate.cfg.xml, I only had to add this:
<property name="c3p0.minPoolSize">5</property>
<property name="c3p0.maxPoolSize">20</property>
<property name="c3p0.timeout">1800</property>
<property name="c3p0.max_statement">50</property>
HTH
-Joe
> -----Original Message-----
> From: Marco Mistroni [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 30, 2004 3:58 AM
> To: 'Struts Users Mailing List'
> Subject: OT/ Tomcat, Hibernate and MYSQL problem
>
>
> Hello,
>
> First of all, I apologize for the off topic issue..
> I know this is not the list, but I tried hibernate forums,
> and Searched the web with no solution.. hopefully some of u
> had the Same problem and solved it..
>
>
> I m experiencing problems with Hibernate in tomcat, talking to mysql.
>
> My situation is that I didn't define any connection pools in
> tomcat, but left it to Hibernate to handle that...
>
> After leaving the application running for 11 hours, I got
> following exception
>
> hi all,
> i have a webapp taht uses Hibernate and MYSQL, running on top
> of tomcat.
>
> i am letting Hibernate handle the connections to mysql db,
> since i have no connection pools defined in tomcat.
> after running the application for nearly 9 hours, when i
> tried to use my app to connect to the database i got
> following exception:
>
> Caused by: net.sf.hibernate.JDBCException: Could not execute query
> at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1476)
> at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:45)
> at
> com.myapp.hibernate.HibernatePersistenceManager.query(Hibernat
> ePersisten
> ceManager.java:205)
> ... 31 more
> Caused by: java.sql.SQLException: Communication link failure:
> java.net.SocketException, underlying cause: Software caused connection
> abort: recv failed
>
> ** BEGIN NESTED EXCEPTION **
>
> java.net.SocketException
> MESSAGE: Software caused connection abort: recv failed
>
> STACKTRACE:
>
> java.net.SocketException: Software caused connection abort:
> recv failed
>
>
>
> now i have searched the web and found two possible
> alternatives.. one was to add following problems to hibernate
> config file.. <property
> name="connection.autoReconnect">true</property>
> <property name="connection.autoReconnectForPools">true</property>
> <property
> name="connection.is-connection-validation-required">true</property>
>
>
> but this does not work, as ihave added thos eproperties to
> hibernate properties file and i am still getting same exception
>
>
> then I tried to add ?autoReconnect=true to JBDC URL, but
> that didn't work either coz I left application running for 11
> hours and after that I got same exception...
>
> can anyone help me out?
>
> THANX in advance and regards
> marco
>
>
>
> l: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]