Announcement Announcement Module
No announcement yet.
problem with maxPoolSize and losing connection Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • problem with maxPoolSize and losing connection

    hi evry body...

    When active connection counts on db reach to "maxPoolSize" connection to db gets lost but there is no exception. It seems it sleeps and stay in waiting mode. and when I check SQL server all the connections are in sleeping status. Even when I try to commit the kill process nothing would happen.
    what can I do? plz help me..
    I use
    spring 2.0.3
    hibernate 3.3.1
    c3p0 0.9.1

    and my configuration is:
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
            <property name="driverClass" value=""/>
            <property name="jdbcUrl" value="jdbc:sqlserver://;databaseName=MyDB"/>
            <property name="user" value="user"/>
            <property name="password" value=""/>
            <property name="initialPoolSize">
            <property name="minPoolSize">
            <property name="maxPoolSize">
            <property name="acquireRetryAttempts">
            <property name="acquireIncrement">
            <property name="idleConnectionTestPeriod">
            <property name="maxIdleTime">
            <property name="maxConnectionAge">
            <property name="preferredTestQuery">
                <value>select 1</value>
            <property name="testConnectionOnCheckin">
    Last edited by Ardeshir; Jul 19th, 2009, 03:40 AM.

  • #2
    If you use hibernate and c3p0 there are issues with hibernate overwriting c3p0's settings.

    There is a great deal of misunderstanding around this issue, to the point that when someone who knows the answer writes a solution it is so vague that it is almost useless.
    You will just have to trawl the forums looking for clues (like what I'm doing) because the documentation is vague and misleading.