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 16:26:00 UTC

[jira] [Updated] (ARTEMIS-4148) Too many open files in JMS consumer

     [ https://issues.apache.org/jira/browse/ARTEMIS-4148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Bertram updated ARTEMIS-4148:
------------------------------------
    Summary: Too many open files in JMS consumer  (was: Too many open files in ims consumer)

> 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)