GenericThreadedImportTask seems to leak open transactions in case of error: in the run method, a transaction is started with any check and if an error occurs, the transaction is not committed or rollback.
According to the code below, the transaction will be committed only if there is no exception before:
recursiveCreateDocumentFromNode(rootDoc, rootSource); session.save(); GenericMultiThreadedImporter.addCreatedDoc(taskId, uploadedFiles); TransactionHelper.commitOrRollbackTransaction();