Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Done
-
1.8.0
-
None
-
None
Description
PublishJMS repeatedly threw "ResourceAllocationException: too many open connections" after successive publish failures due to issues on the remote JMS Broker. The cause of this is the specification and implementation of the JMSConnectionFactoryProviderDefinition.resetConnectionFactory(ConnectionFactory cf) method. Setting the ConnectionFactory to null may well indeed close connections upon 'destruction', but it may take awhile for the GC to run; in the meantime, more connections are opened. The connections need to be manually closed rather than waiting for a GC.
From AbstractJMSProcessor.onTrigger(), need to call worker.shutdown() prior to resetConnectionFactory().
Also, noticed some problems iwth the ConnectionFactoryProviderDefinition implementatoins wrt the resetConnectionFactory methods. The factory is nulled but never re-initialized but for onEnabled(); which will lead to a NPE at some point.
Attachments
Issue Links
- is fixed by
-
NIFI-7034 Connection leak with JMSConsumer and JMSPublisher
- Resolved
- links to