Project

General

Profile

Actions

Bug #5254

closed

provenance database connections keep growing when using Reporting suite.

Added by jianwu jianwu about 14 years ago. Updated about 14 years ago.

Status:
Resolved
Priority:
Normal
Category:
reporting
Target version:
Start date:
12/09/2010
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
5254

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

Blocked by Kepler - Bug #5095: test kepler and wrp for memory leaksIn Progressjianwu jianwu07/14/2010

Actions
Actions #1

Updated by Derik Barseghian about 14 years ago

The first execution in any new window makes a new db connection. This is because a new SQLRecordingV8 is created for each new window (with _needReconnectDB set to true).
ProvenanceRecorder.attributeChanged() calls ProvenanceRecorder._changeRecordingType() which constructs the new SQLRecordingV8 with: newObj = rec.newInstance();

Should these connections instead come from a shared pool?

In r26477 I made a change to WorkflowRunManagerPanel so it hopefully doesn't reconnect when unnecessary.

I need to look more for other unnecessary connections, and re: proper disconnection...

Actions #2

Updated by Derik Barseghian about 14 years ago

Jianwu tested this after my change, and he says he doesn't see the number of connections increasing for new windows or other events and that we can close this now.

Actions #3

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 5254

Actions

Also available in: Atom PDF