| Article: |
Database Connection Pooling with Tomcat | |
| Subject: | Easier said than done: connection pooling | |
| Date: | 2006-10-08 16:53:35 | |
| From: | jpower | |
|
Response to: Easier said than done: connection pooling
|
||
|
I specified maxActive=100 and maxIdle=20 for my webapp. But as the app runs, the connections just ramped up. After a while, even if no one was using the app, I saw ~ 30 idle connections there, much bigger than the value of maxIdle. Unless I shutdown Tomcat, the number doesn't get smaller. This is giving me huge headache since I know the app is going to blow up as user keeps using it. I take special care in closing connections in the finally block: fnally { if (con != null) con.close; } However, I didn't try to close PreparedStatement in finally block because I assume if I close the connection, PreparedStatement will be automaticall closed. Thanks. |
||
Women in Technology
Hear us Roar
