<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Mauricio,<div><br></div><div>thank you for the really fast response on this…</div><div><br></div><div>after your suggestion, I came across this …</div><div><br></div><div><a href="http://mina.apache.org/faq.html#FAQ-Myserverfailswithjava.net.SocketException%3AToomanyfilesopen">http://mina.apache.org/faq.html#FAQ-Myserverfailswithjava.net.SocketException%253AToomanyfilesopen</a></div><div><br></div><div>but it appears that the connections on my system are not being closed at all, not sure why they aren't timing out.</div><div><br></div><div>Unless I shutdown Tomcat and restart it, the file handlers do not get released.</div><div><br></div><div>I could change my limit to something else, but I feel this would just delay the problem by a few seconds or minutes at the best.</div><div><br></div><div>Any other suggestions?</div><div><br></div><div>regards,</div><div><br><div apple-content-edited="true">
<div><b><br></b></div></div><div><div>On Nov 9, 2011, at 10:32 AM, Mauricio Salatino wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Yes, I saw that problem in a linux machine only. It's about the amount sockets that the system is able to open.<div>I remember looking at the Mina documentation to see how to fix it, but something should be wrong there.. because it's not supposed to open a huge amount of sockets for working.</div>

<div>Cheers<br><br><div class="gmail_quote">On Wed, Nov 9, 2011 at 12:10 PM, Cracel, Rogerio <span dir="ltr">&lt;<a href="mailto:rcracel@cghtech.com">rcracel@cghtech.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">




<div style="word-wrap:break-word">I have been experiencing constant 'Too many open files' exceptions on the TaskClient during connect()<div><br></div><div>For every operation, I connect and disconnect as such…</div>

<div><br></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">TaskClient client = <span style="color:#961a65">new</span> TaskClient(<span style="color:#961a65">new</span> MinaTaskClientConnector(<span style="color:#3b3df5">&quot;client 1&quot;</span>, <span style="color:#961a65">new</span> MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));</div>

<div><br></div><div>…. invoke operation on the task server (complete, release, claim, …)</div><div><br></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">client.disconnect();</div></div>

<div><br></div><div>The exception only manifests itself when attempting to connect to the task client, the remaining of the application (database connections, servlet requests, …) complete successfully.</div><div><br></div>

<div>Any insight on this would be very much appreciated.</div><div><br></div><div>Thank you.</div><div><br></div><div>----</div><div><pre style="color:rgb(0, 0, 0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255, 255, 255)">
java.io.IOException: Too many open files
        sun.nio.ch.IOUtil.initPipe(Native Method)
        sun.nio.ch.EPollSelectorImpl.&lt;init&gt;(EPollSelectorImpl.java:49)
        sun.nio.ch.EPollSelectorProvider.openSelector(EPollSelectorProvider.java:18)
        java.nio.channels.Selector.open(Selector.java:209)
        org.apache.mina.transport.socket.nio.NioProcessor.&lt;init&gt;(NioProcessor.java:56)
        sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        org.apache.mina.core.service.SimpleIoProcessorPool.&lt;init&gt;(SimpleIoProcessorPool.java:156)
        org.apache.mina.core.service.SimpleIoProcessorPool.&lt;init&gt;(SimpleIoProcessorPool.java:104)
        org.apache.mina.core.polling.AbstractPollingIoConnector.&lt;init&gt;(AbstractPollingIoConnector.java:93)
        org.apache.mina.transport.socket.nio.NioSocketConnector.&lt;init&gt;(NioSocketConnector.java:55)
        org.jbpm.task.service.mina.MinaTaskClientConnector.connect(MinaTaskClientConnector.java:60)
        org.jbpm.task.service.TaskClient.connect(TaskClient.java:745)
        gov.faa.aim.utils.TaskUtils.connect(TaskUtils.java:52)
        gov.faa.aim.utils.TaskUtils.getTasksForUser(TaskUtils.java:107)
        gov.faa.aim.web.controllers.TaskViewController.listTasks(TaskViewController.java:179)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:597)
        org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
        org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
        org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
        org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
        org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
        org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
        org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:574)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:369)
        org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
        org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
        org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:168)
        org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
</pre><div style="font-family:Tahoma, Arial, sans-serif;background-color:rgb(255, 255, 255);color:rgb(0, 0, 0);font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

<br></div></div></div></div><br>_______________________________________________<br>
jbpm-dev mailing list<br>
<a href="mailto:jbpm-dev@lists.jboss.org">jbpm-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/jbpm-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jbpm-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>&nbsp;- CTO @ <a href="http://www.plugtree.com/" target="_blank">http://www.plugtree.com</a>&nbsp; <br>&nbsp;- MyJourney @ <a href="http://salaboy.wordpress.com/" target="_blank">http://salaboy.wordpress.com</a><div>

&nbsp;- Co-Founder @ <a href="http://www.jugargentina.org/" target="_blank">http://www.jugargentina.org</a><br>&nbsp;- Co-Founder @ <a href="http://www.jbug.com.ar/" target="_blank">http://www.jbug.com.ar</a><br>&nbsp;<br>&nbsp;- Salatino &quot;Salaboy&quot; Mauricio -</div>

<br>
</div>
</blockquote></div><br></div></body></html>