Robert Tuck commented on Improvement MIFOSX-254

Tracked the connection leak to a couple of issues:

  • TomcatJdbcDataSourcePerTenantService checks the connection map and populates it with a new connection if none is found, however this isn't performed atomically so may overwrite the entry in the map if one is created on another thread.
  • ReadReportingServiceImpl calls getConnection() on the DataSource but doesn't close it. TBH, not sure if this was an actual leak since only call is to getCatalog() but better safe than sorry.

I didn't change the settings for the data source, they are

initialSize:5

also the remaining settings are defaults according to http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

maxActive:100
maxIdle:100 – This is the maximum #of idle connections, but if they are idle for longer than minEvictableIdleTimeMillis then they will get reaped

minIdle:10
maxWait:30000 ms
timeBetweenEvictionRunsMillis:5000 ms
minEvictableIdleTimeMillis: 60000 ms

Suspect most of these values are OK for most installs, the only one that probably needs looking at in more detail is the # max Active connections, which should probably be set to < whatever the maximum configured for the mysql DB install (100?).

However it might be better to make these configurable rather than hard coded.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to