Hi, I would increase nofile (ulimit -n) and see if it works.
And the first thing I always do after clean install is to put 65535 as a nofile and noproc limit in /etc/security/limits.conf: # I'm on Fedora Thanks, Tomo On 04/26/2017 04:23 AM, urwithsumit wrote:
Hi, I have a rest API exposed using camel Jetty. The api makes call to another API to fetch some data. Intermittently, we are getting exception "I/O exception (java.net.SocketException) caught when processing request: Too many open files". The number of connections is well below the default Unix uLimit of 1024. I am using Camel 2.18.2. Any pointers to solve this problem? 2017-04-25T09:19:11,341 INFO [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpMethodDirector: Retrying request 2017-04-25T09:19:11,341 DEBUG [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpConnection: Open connection to XXXXXXX 2017-04-25T09:19:11,341 DEBUG [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpMethodDirector: Closing the connection. 2017-04-25T09:19:11,341 INFO [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpMethodDirector: I/O exception (java.net.SocketException) caught when processing request: Too many open files 2017-04-25T09:19:11,341 INFO [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpMethodDirector: Retrying request 2017-04-25T09:19:11,341 DEBUG [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpConnection: Open connection to p1dn-id-vs:8080 2017-04-25T09:19:11,341 DEBUG [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpMethodDirector: Closing the connection. 2017-04-25T09:19:11,341 INFO [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpMethodDirector: I/O exception (java.net.SocketException) caught when processing request: Too many open files 2017-04-25T09:19:11,342 INFO [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpMethodDirector: Retrying request 2017-04-25T09:19:11,342 DEBUG [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpConnection: Open connection to XXXXXXX 2017-04-25T09:19:11,342 DEBUG [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpMethodDirector: Closing the connection. 2017-04-25T09:19:11,342 DEBUG [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpMethodDirector: Method retry handler returned false. Automatic recovery will not be attempted 2017-04-25T09:19:11,342 DEBUG [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.HttpConnection: Releasing connection back to connection manager. 2017-04-25T09:19:11,342 DEBUG [qtp1005845925-25 - /check_dnc_media] org.apache.commons.httpclient.MultiThreadedHttpConnectionManager: Freeing connection, hostConfig=HostConfiguration[host=http: XXXXXX Route definition: <camel:route id="dnc_webget_route"> <from uri="jetty:{{dnc.dmz.service.address}}/check_dnc_media" /> <camel:removeHeaders pattern="CamelHttp*" /> <camel:setHeader headerName="CamelHttpMethod"> <camel:constant>GET</camel:constant> </camel:setHeader> <camel:setHeader headerName="Content-Type"> <camel:constant>application/json</camel:constant> </camel:setHeader> <camel:enrich> <camel:simple> {{dnc.api.url}}?throwExceptionOnFailure=false </camel:simple> </camel:enrich> <camel:unmarshal ref="succ_resp" /> <camel:process ref="dncResponseProcessor" /> <camel:process ref="webgetResponseProcessor" /> <camel:onException id="camel_OnException"> <camel:exception>java.net.ConnectException</camel:exception> <camel:exception>java.lang.Throwable</camel:exception> <camel:handled> <constant>true</constant> </camel:handled> <camel:process ref="webGetExceptionProcessor" id="webGetExceptionProcessor" /> </camel:onException> </camel:route> -- View this message in context: http://camel.465427.n5.nabble.com/Camel-HTTP-I-O-exception-java-net-SocketException-caught-when-processing-request-Too-many-open-files-tp5798262.html Sent from the Camel - Users mailing list archive at Nabble.com.