Re: How to shutdown Camel context when threshold exceeded?

2017-02-02 Thread raffi
But is the error sufficient to force Camel to shutdown? I assume it is given
the resource, in this case, is no different than memory; if there's none
left, the process cannot continue.



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-shutdown-Camel-context-when-threshold-exceeded-tp5793360p5793385.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to shutdown Camel context when threshold exceeded?

2017-02-02 Thread souciance
Somewhere some stream or handle is probably not being closed.

On Thu, Feb 2, 2017 at 6:30 PM, raffi [via Camel] <
ml-node+s465427n5793376...@n5.nabble.com> wrote:

> I believe you are right, just found likely problem: camel-salesforce
> connector, too many open file handles, a bit odd the exception is a
> WARNing, not a ERROR.
>
>
> On RHEL 7.2/Java 1.8/Camel 2.15.1
> --
> ulimit -n
> 1024
>
> (just before process shuts down)
>
> lsof -i TCP -p  | grep TCP | wc -l
> 4055
>
>
> Exception in log
> ==
>
> 02-02-17 12:00:14 WARN(A-route) [org.eclipse.jetty.client.HttpExchange]:
> CONNECTION FAILED SalesforceExchange@32901595=GET//ofi--QA.cs17.my.
> salesforce.com:443/services/data/v33.0/sobjects/Contact/
> 0036026G5OqAAK#CONNECTING(54ms)->EXCEPTED(0ms)
> java.net.SocketException: Too many open files
> at sun.nio.ch.Net.socket0(Native Method) ~[na:1.8.0_51]
> at sun.nio.ch.Net.socket(Net.java:416) ~[na:1.8.0_51]
> at sun.nio.ch.Net.socket(Net.java:409) ~[na:1.8.0_51]
> at sun.nio.ch.SocketChannelImpl.(SocketChannelImpl.java:105)
> ~[na:1.8.0_51]
> at 
> sun.nio.ch.SelectorProviderImpl.openSocketChannel(SelectorProviderImpl.java:60)
> ~[na:1.8.0_51]
> at java.nio.channels.SocketChannel.open(SocketChannel.java:145)
> ~[na:1.8.0_51]
> at 
> org.eclipse.jetty.client.SelectConnector.startConnection(SelectConnector.java:73)
> ~[jetty-client-8.1.16.v20140903.jar!/:8.1.16.v20140903]
> at 
> org.eclipse.jetty.client.HttpDestination.startNewConnection(HttpDestination.java:292)
> [jetty-client-8.1.16.v20140903.jar!/:8.1.16.v20140903]
> at 
> org.eclipse.jetty.client.HttpDestination.doSend(HttpDestination.java:597)
> [jetty-client-8.1.16.v20140903.jar!/:8.1.16.v20140903]
> at 
> org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:532)
> [jetty-client-8.1.16.v20140903.jar!/:8.1.16.v20140903]
> at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:180)
> [jetty-client-8.1.16.v20140903.jar!/:8.1.16.v20140903]
> at org.apache.camel.component.salesforce.internal.client.
> AbstractClientBase.doHttpRequest(AbstractClientBase.java:174)
> [salesforce-connector-ofi-2.15.1.redhat-621084.jar!/:2.15.1.redhat-621084]
>
>
> ----------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/How-to-shutdown-Camel-
> context-when-threshold-exceeded-tp5793360p5793376.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=465428=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-shutdown-Camel-context-when-threshold-exceeded-tp5793360p5793383.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to shutdown Camel context when threshold exceeded?

2017-02-02 Thread raffi
I believe you are right, just found likely problem: camel-salesforce
connector, too many open file handles, a bit odd the exception is a WARNing,
not a ERROR.


On RHEL 7.2/Java 1.8/Camel 2.15.1
--
ulimit -n
1024

(just before process shuts down)

lsof -i TCP -p  | grep TCP | wc -l  
4055


Exception in log
==

02-02-17 12:00:14 WARN(A-route) [org.eclipse.jetty.client.HttpExchange]:
CONNECTION FAILED
SalesforceExchange@32901595=GET//ofi--QA.cs17.my.salesforce.com:443/services/data/v33.0/sobjects/Contact/0036026G5OqAAK#CONNECTING(54ms)->EXCEPTED(0ms)
java.net.SocketException: Too many open files
at sun.nio.ch.Net.socket0(Native Method) ~[na:1.8.0_51]
at sun.nio.ch.Net.socket(Net.java:416) ~[na:1.8.0_51]
at sun.nio.ch.Net.socket(Net.java:409) ~[na:1.8.0_51]
at sun.nio.ch.SocketChannelImpl.(SocketChannelImpl.java:105)
~[na:1.8.0_51]
at
sun.nio.ch.SelectorProviderImpl.openSocketChannel(SelectorProviderImpl.java:60)
~[na:1.8.0_51]
at java.nio.channels.SocketChannel.open(SocketChannel.java:145)
~[na:1.8.0_51]
at
org.eclipse.jetty.client.SelectConnector.startConnection(SelectConnector.java:73)
~[jetty-client-8.1.16.v20140903.jar!/:8.1.16.v20140903]
at
org.eclipse.jetty.client.HttpDestination.startNewConnection(HttpDestination.java:292)
[jetty-client-8.1.16.v20140903.jar!/:8.1.16.v20140903]
at
org.eclipse.jetty.client.HttpDestination.doSend(HttpDestination.java:597)
[jetty-client-8.1.16.v20140903.jar!/:8.1.16.v20140903]
at
org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:532)
[jetty-client-8.1.16.v20140903.jar!/:8.1.16.v20140903]
at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:180)
[jetty-client-8.1.16.v20140903.jar!/:8.1.16.v20140903]
at
org.apache.camel.component.salesforce.internal.client.AbstractClientBase.doHttpRequest(AbstractClientBase.java:174)
[salesforce-connector-ofi-2.15.1.redhat-621084.jar!/:2.15.1.redhat-621084]



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-shutdown-Camel-context-when-threshold-exceeded-tp5793360p5793376.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to shutdown Camel context when threshold exceeded?

2017-02-02 Thread Claus Ibsen
No it has not. Maybe the JVM is running out of memory or something.



On Thu, Feb 2, 2017 at 5:01 PM, raffi <raffi.onj...@gmail.com> wrote:
> Claus,
>
> I'm asking because something is shutting down our route process in
> production, and we cannot determine what's doing it. We observe this
> happening under high load situations. Do any Camel endpoints have a default
> setting that automatically stops the context? I would think not but I
> figured I'd ask,
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-to-shutdown-Camel-context-when-threshold-exceeded-tp5793360p5793366.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: How to shutdown Camel context when threshold exceeded?

2017-02-02 Thread raffi
Claus,

I'm asking because something is shutting down our route process in
production, and we cannot determine what's doing it. We observe this
happening under high load situations. Do any Camel endpoints have a default
setting that automatically stops the context? I would think not but I
figured I'd ask,



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-shutdown-Camel-context-when-threshold-exceeded-tp5793360p5793366.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to shutdown Camel context when threshold exceeded?

2017-02-02 Thread Claus Ibsen
To stop the entire Camel context?

You can use controlbus there is an example at
http://camel.apache.org/controlbus

On Thu, Feb 2, 2017 at 3:59 PM, raffi <raffi.onj...@gmail.com> wrote:
> Is there any endpoint in Camel, either seda, direct, activemq, jpa, or
> splitter, that automatically shuts down the context if a setting on the
> endpoint is exceeded?
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-to-shutdown-Camel-context-when-threshold-exceeded-tp5793360.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


How to shutdown Camel context when threshold exceeded?

2017-02-02 Thread raffi
Is there any endpoint in Camel, either seda, direct, activemq, jpa, or
splitter, that automatically shuts down the context if a setting on the
endpoint is exceeded? 







--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-shutdown-Camel-context-when-threshold-exceeded-tp5793360.html
Sent from the Camel - Users mailing list archive at Nabble.com.