Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.2
Hi,
I think there is a problem with c3p0 connection pooling. I tried 140
concurrent operations via Threads which starts at same time. Each
thread gets a new Session. Persists some data. Commits the session.
Closes the session. Although i 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 the hibernate properties file's content 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 closes session
t.writeStatus();
}
System.out.println("Run Finished");
}
}