[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-1482) Connection Pooling Problem

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Mar 21 13:01:06 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-1482.
-------------------------------


Closing stale resolved issues

> Connection Pooling Problem
> --------------------------
>
>                 Key: HHH-1482
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1482
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1.2
>         Environment: Java SDK 1.4.2_06, Windows XP Pro SP2,Oracle 8.1.7 (150 conn.max)
>            Reporter: Hakan Cunier
>            Priority: Critical
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Hi,
> I think there is a problem with c3p0 connection pooling. I tried 140 concurrent operations via Threads which starts at sime time. Each thread gets a new Session. Persist some data. Commits the session. Closes the session. Although we set c3p0 max connection to 140 it throws an error as java.sql.SQLException: ORA-00020: maximum number of processes (150) exceeded.
> When i set c3p0 max connection <100 it works correctly. What is going on? Can you help me? 
> Here is hibernate properties file's context
> hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
> hibernate.connection.url = jdbc:oracle:thin:@127.0.0.1:1521:EDYS
> hibernate.connection.username = edys2
> hibernate.connection.password = edys2
> hibernate.connection.autocommit = false
> hibernate.dialect = org.hibernate.dialect.OracleDialect
> #DBCP Open Source Connection Pooling Parameters
> hibernate.c3p0.min_size=5
> hibernate.c3p0.max_size=140     ---> when set as lower like (80 or 10) there is no problem
> hibernate.c3p0.timeout=300
> hibernate.c3p0.max_statements=7500
> hibernate.c3p0.acquire_increment=1
> here is threads code(given for telling the idea):
> class testRun implements Runnable {
>     public void run() {
>         System.out.println("Run Started");
>         long starttime =System.currentTimeMillis()+3000;
>         for (int i=0; i<140;i++ ){
>             long sleeptime=starttime-System.currentTimeMillis();
>             testThread t = new testThread(i+50,sleeptime);
>             t.start();//it gets a session, save data to one table,commits and close session
>             t.writeStatus();
>         }
>         System.out.println("Run Finished");
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list