[ 
https://issues.apache.org/jira/browse/ARTEMIS-4148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17682153#comment-17682153
 ] 

Juergen Melzer commented on ARTEMIS-4148:
-----------------------------------------

I set the ulimit to 20000 but still error occurs. I guess the socket isn't 
closed anymore.

> Too many open files in ims 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:
> Caused by: io.netty.channel.ChannelException: 
> io.netty.channel.unix.Errors$NativeIoException: newSocketStream(..) failed: 
> Too many open files
>  
> This our code
> {color:#000080}public void {color}process({color:#000080}long 
> {color}receiveTimeout) {
> Connection jmsConnection = {color:#000080}null{color};
> {color:#000080}try {color}{
>     jmsConnection = 
> {color:#660e7a}connectionFactory{color}.createConnection();
>     jmsConnection.start();
> } {color:#000080}catch {color}(RuntimeException | JMSException e) {
>     {color:#808080}// rolling back the batch
> {color}{color:#808080}    {color}closeConnection(jmsConnection);
>     {color:#000080}throw new {color}ConsumerException({color:#008000}"batch 
> processing"{color}, e);
> }
> {color:#000080}try {color}(Session jmsSession = 
> jmsConnection.createSession({color:#000080}true{color}, 
> Session.{color:#660e7a}AUTO_ACKNOWLEDGE{color})) {
> Queue q = jmsSession.createQueue({color:#660e7a}queueName{color});
> {color:#000080}try {color}(MessageConsumer messageConsumer = 
> jmsSession.createConsumer(q)) {
>    ....
>     jmsSession.commit();
> } {color:#000080}catch {color}(JMSException e) {
>     {color:#000080}throw new {color}ConsumerException({color:#008000}"batch 
> processing"{color}, e);
> } {color:#000080}finally {color}{
>     closeConnection(jmsConnection);
> }
> }



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to