commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mugoma Joseph Okomba" <mug...@yengas.com>
Subject [dbcp] Using RemoveAbandoned causing OutOfMemoryError
Date Thu, 20 Dec 2012 16:05:47 GMT
Hello,

I am using DBCP 1.4 with the settings:

		BasicDataSource ds = new BasicDataSource();
		ds.setDriverClassName(driverClassName);
		ds.setUsername(dbUser);
		ds.setPassword(dbPass);
		ds.setUrl(connectURI);

		ds.setInitialSize(INITIAL_SIZE);
		ds.setMaxActive(MAX_ACTIVE);
		ds.setMaxIdle(MAX_IDLE);
		ds.setRemoveAbandoned(true);

However, ds.setRemoveAbandoned(true) seems to be triggering OutOfMemoryError:

java.lang.OutOfMemoryError: Java heap space
at java.io.BufferedWriter.<init>(BufferedWriter.java:104)
at java.io.BufferedWriter.<init>(BufferedWriter.java:87)
at java.io.PrintWriter.<init>(PrintWriter.java:127)
at java.io.PrintWriter.<init>(PrintWriter.java:110)
at org.apache.commons.dbcp.AbandonedConfig.<init>(AbandonedConfig.java:137)
at
org.apache.commons.dbcp.BasicDataSource.setRemoveAbandoned(BasicDataSource.java:1169)


Any idea how to use setRemoveAbandoned (true) without causing error?

Thanks.

Mugoma.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message