History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-686
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Dmitry Katsubo
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Sesame

RDBMS repository store memory leak in Batch class

Created: 07/Oct/09 12:11 AM   Updated: 07/Oct/09 12:12 AM
Component/s: RDBMS Sail
Affects Version/s: 2.2.4
Fix Version/s: None

File Attachments: None
Image Attachments:

1. sesame-rdbms-memleak.png
(44 kb)
Environment: - Java 6
- Sesame 2.2.4
- RDBMS repository store over MySQL DB
- MySQL connector 5.1.6


 Description   
The information I have states that once one has opened a connection and use it to insert the data in sequential transactions (e.g. repository.getConnection() -> connection.commit() -> connection.commit() ... -> connection.close()) the application is loosing memory. After profiling I came to the opinion (which might me wrong) that the PreparedStatement object, which is allocated in

org.openrdf.sail.rdbms.schema.TransactionTable.buildInsertSelect()

and set to the batch via

org.openrdf.sail.rdbms.schema.Batch.setInsertStatement()

is closed only when connection is closed:

RdbmsConnection.closeInternal()
   -> RdbmsTripleRepository.close()
      -> TripleManager.close()
         -> TransTableManager.close()
            -> TransactionTable.close()

(I suppose it should be closed in Batch.flush())

This leads to memory leak if connection is kept opened between transactions.

In the attachment you can see the memory allocation for the application after approx 30 mins of execution.


 All   Comments   Change History      Sort Order:
There are no comments yet on this issue.