You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2023/01/30 18:08:00 UTC
[jira] [Commented] (ARTEMIS-4148) Too many open files in JMS consumer
[ https://issues.apache.org/jira/browse/ARTEMIS-4148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17682220#comment-17682220 ]
Justin Bertram commented on ARTEMIS-4148:
-----------------------------------------
I plugged the code you pasted into a local test, and I didn't see any accumulation of connections or evidence of unclosed sockets. I would expect that if there was a problem with a use-case this basic we would have seen reports about it before now or seen problems in the test-suite.
Can you provide a way to reproduce what you're seeing? If not, this issue will be closed as "Cannot Reproduce."
> Too many open files in JMS consumer
> -----------------------------------
>
> Key: ARTEMIS-4148
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4148
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: JMS
> Affects Versions: 2.27.1
> Reporter: Juergen Melzer
> Priority: Major
>
> After upgrade from 2.24.0 to current release we see the following error:
> {noformat}
> Caused by: io.netty.channel.ChannelException: io.netty.channel.unix.Errors$NativeIoException: newSocketStream(..) failed: Too many open files{noformat}
> This our code:
> {code:java}
> public void process(long receiveTimeout) {
> Connection jmsConnection = null;
> try {
> jmsConnection = connectionFactory.createConnection();
> jmsConnection.start();
> } catch (RuntimeException | JMSException e) {
> // rolling back the batch
> closeConnection(jmsConnection);
> throw new ConsumerException("batch processing", e);
> }
> try (Session jmsSession = jmsConnection.createSession(true, Session.AUTO_ACKNOWLEDGE)) {
> Queue q = jmsSession.createQueue(queueName);
> try (MessageConsumer messageConsumer = jmsSession.createConsumer(q)) {
> ...
> jmsSession.commit();
> } catch (JMSException e) {
> throw new ConsumerException("batch processing", e);
> } finally {
> closeConnection(jmsConnection);
> }
> }{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)