Bug #5254
closedprovenance database connections keep growing when using Reporting suite.
0%
Description
Every time a window is open, or a workflow is saved, running, a separate db connection is gotten. but they are not released when a window is closed. It will cause memory usage goes up.
We guess WorkflowRunManager.disconnect() should call SQLQueryV8.disconnect() to close the connection. Currently, SQLQueryV8.disconnect() is not called by any classes.
If we can reuse existing connections. The performance will be better than creating and closing a new one.
This is one stack trace for db connection when a window is open:
DatabaseFactory.getConnectedDatabaseType(Map<String,String>, String) line: 154
SQLQueryV8.<init>(Map<String,String>) line: 77
WorkflowRunManager.connect() line: 135
WorkflowRunManagerPanel.reconnect() line: 960
WorkflowRunManagerPanel.resetProvenanceInfo(ProvenanceStore) line: 937
WorkflowRunManagerPanel.initializeTab() line: 231
TabPaneFactory.createTabPaneTabs(TableauFrame) line: 110
TabManager.initializeTabs(TableauFrame) line: 87
KeplerGraphFrame._initBasicGraphFrame() line: 377
KeplerGraphFrame(BasicGraphFrame).<init>(NamedObj, Tableau, LibraryAttribute) line: 224
KeplerGraphFrame(ExtendedGraphFrame).<init>(CompositeEntity, Tableau, LibraryAttribute) line: 95
KeplerGraphFrame(ActorGraphFrame).<init>(CompositeEntity, Tableau, LibraryAttribute) line: 135
KeplerGraphFrame.<init>(CompositeEntity, Tableau, LibraryAttribute) line: 180
KeplerGraphTableau.<init>(PtolemyEffigy, String, LibraryAttribute) line: 164
KeplerGraphTableau$Factory.createTableau(Effigy) line: 227
PtolemyTableauFactory.createTableau(Effigy) line: 100
TableauFactory.createTableau(Effigy) line: 127
Configuration.createPrimaryTableau(Effigy) line: 569
TableauFrame$1.actionPerformed(ActionEvent) line: 519
Related issues