dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #06609
Re: [Bug 603641] Re: c3p0 properties not being read from hibernate.properties
Well investigated.
Did you try adding this property to hibernate.props if so did it have
any effect?
hibernate.connection.provider_class =
org.hibernate.connection.C3P0ConnectionProvider
If not I think we should add your file as suggested and include it in
dhis-support-hibernate">.
On Fri, Jul 9, 2010 at 6:51 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
> It seems this may be a general problem with later versions of hibernate
> (we upgraded a few months back).
>
> A fix has been committed to the latest hibernate trunk very recently,
> but I guess we won't see that for a while:
> http://opensource.atlassian.com/projects/hibernate/browse/HHH-4156
>
> As a workaround I have found that all c3p0 properties can be tuned in an
> external properties file. This is contrary to the c3p0 documentation
> which says certain properties can only be and must be set in
> hibernate.properties.
>
> Just create a file named c3p0-config.xml with contents similar to the following:
> <c3p0-config>
> <default-config>
> <property name="maxIdleTime">600</property>
> <property name="idleConnectionTestPeriod">60</property>
> <property name="initialPoolSize">3</property>
> <property name="maxPoolSize">20</property>
> <property name="minPoolSize">1</property>
> </default-config>
> </c3p0-config>
>
> and place that somewhere in your application classpath. From there you
> can tune your pool to meet your site specific requirements.
>
> I have tested that connection pools operate as expected on mysql and
> postgres using this configuration file. Haven't gone so far as
> including a default config inside dhis2. Do we need one? Or is this
> kind of tuning always going to be site specific?
>
>
> ** Changed in: dhis2
> Status: New => Won't Fix
>
> --
> c3p0 properties not being read from hibernate.properties
> https://bugs.launchpad.net/bugs/603641
> You received this bug notification because you are a member of DHIS 2
> coordinators, which is the registrant for DHIS.
>
> Status in DHIS 2 - District Health Information Software: Won't Fix
>
> Bug description:
> c3p0 properties are being ignored when present in hibernate.properties.
>
> Connection pooling is thus stuck at default (min 3, max 15) and mysql connections are fragile because they cannot be configured to refresh.
>
> So for example the following settings have no effect:
> hibernate.c3p0.max_size = 50
>
> hibernate.c3p0.min_size = 5
> hibernate.c3p0.timeout = 300
> 0
> hibernate.c3p0.max_statements = 0
>
> hibernate.c3p0.idle_test_period = 300
> hibernate.c3p0.acquire_increment = 1
>
> hibernate.c3p0.max_statements_per_connection = 0
>
> hibernate.c3p0.validate = false
>
>
>
--
c3p0 properties not being read from hibernate.properties
https://bugs.launchpad.net/bugs/603641
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
Status in DHIS 2 - District Health Information Software: Won't Fix
Bug description:
c3p0 properties are being ignored when present in hibernate.properties.
Connection pooling is thus stuck at default (min 3, max 15) and mysql connections are fragile because they cannot be configured to refresh.
So for example the following settings have no effect:
hibernate.c3p0.max_size = 50
hibernate.c3p0.min_size = 5
hibernate.c3p0.timeout = 300
0
hibernate.c3p0.max_statements = 0
hibernate.c3p0.idle_test_period = 300
hibernate.c3p0.acquire_increment = 1
hibernate.c3p0.max_statements_per_connection = 0
hibernate.c3p0.validate = false
References