Techniques for discovering database connectivity leaks
AssigneeTeradata US, Inc.
InventorDennis Avery Tackett
Life of this patent
Estimating the term…
Abstract
Techniques for discovering database connectivity leaks are presented. Each connection made by an application to a database is monitored. When the application is shut down, if information regarding a particular connection remains in memory, then that connection is reported as a potential database connectivity leak.
Claims20
A method implemented in a non-transitory computer-readable storage medium and processed by a processor to perform the method, comprising:
- detecting, by the processor, connections made to a database from an application;
- maintaining, by the processor, a unique connection record for each separate connection when that connection is established to the database and maintaining an internal map having a new entry for each separate connection and its unique connection record, each new entry having a key for a connecting object stored with that new entry in the internal map along with a value for that key, that value is a string representing a stack trace taken at a time of a call to get the separate connection to which the new entry relates;
- and
- reporting, by the processor, any remaining connection records that remain when the application is shut down as connection leaks.
A method implemented in a non-transitory computer-readable storage medium and processed by a processor to perform the method, comprising:
- gathering, by the processor, a set of connection information for each connection made to a database by an application, each connection including a string representing a connection call stack for that connection;
- removing, by the processor, each set of connection information for each connection that is properly closed;
- and
- reporting, by the processor, each remaining set of connection information for each connection that remains open when the application terminates, each remaining set of connection information identified as a connection leak available from that remaining connection's string.
A processor-implemented system, comprising:
- one or more processors having a database implemented in a non-transitory computer-readable storage medium and executed on the one or more processors of a network;
- and
- the one or more processors also having a database interface implemented in a non-transitory computer-readable storage medium and executed on the one or more processors of the network;
- the database interface configured to maintain a unique connection record for each connection made by an application to the database, the database interface further configured to remove each particular connection record when a particular connection is closed properly from within the application and the database interface configured to report each remaining connection record when a remaining connection remains open when the application shuts down as a connection leak by iterating over an internal map of the unique connection records to acquire stack traces for opened connections.
Dependencies are inferred from the claim text.