0

I use restlet in camel route in from("restlet:http/myLink") clause. When user's requests more then ten per second, I begin recieve errors processing request like a "org.restlet.engine.connector.Controller run INFO: Connector overload detected. Stop accepting new work"

I think, that error is caused by number of threads,request query's size or number,or something like that. I try set to maxThreads param different values in spring config

 <bean id="restlet" class="org.apache.camel.component.restlet.RestletComponent">
    <property name="maxThreads" value="15"/>
 </bean>

but I am not succeed. In documentation http://camel.apache.org/restlet.html I ddin't find ant param for setting size\number of request queue. I need help :(

P.S. camel-restlet version is 2.12.2

Update

I try to set big numbers to maxThreads,maxConnectionsPerHost,maxTotalConnections, but it's useless. If inject org.restlet.Component to camel's config like that:

 <bean id="restletComponent" class="org.restlet.Component" />

<bean id="restlet" class="org.apache.camel.component.restlet.RestletComponent">
    <constructor-arg index="0">
        <ref bean="restletComponent" />
    </constructor-arg>
    <property name="maxThreads" value="255"/>
    <property name="maxConnectionsPerHost" value="1000"/>
    <property name="maxTotalConnections" value="1000" />
</bean>

How I can override properties, that use BaseHelper params?

ZaptoS
  • 141
  • 1
  • 1
  • 9

1 Answers1

-1

After go through the options of lowThread as well. But I found current released camel doesn't support it.

Willem Jiang
  • 3,291
  • 1
  • 14
  • 14
  • But default value "-1" for both params doesn't mean "use as many as you wish"? Can you advise what options I can set to handle 100 requests per second? – ZaptoS Dec 17 '13 at 12:05
  • The configuration is from the Restlet ( as you can see https://github.com/apache/camel/blob/master/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java#L265 ), not from the Camel/Camel's component. I couldn't find any documentation from Restlet to list and specify all the parameters very well, just the http://restlet.org/learn/javadocs/snapshot/jee/ext/org/restlet/ext/httpclient/HttpClientHelper.html , but those two and the number of threads can make the most impact change over the throughput. – lcestari Dec 17 '13 at 13:15
  • I just checked the code of org.restlet.engine.connector.Controller, the info log means there is no active worker thread for restlet to use. You can find more configuration about thread setting here. http://restlet.org/learn/javadocs/2.1/jee/engine/org/restlet/engine/connector/BaseHelper.html – Willem Jiang Dec 17 '13 at 13:31
  • I saw params of BaseHelper, especially *maxQueued*, but in camel's RestletComponent that parameter doesn't exist. How inject setting from not camel's restlet to camel's restlet? Please, provide sample code in answer. P.S. I update my firts question. – ZaptoS Dec 17 '13 at 14:19
  • We don't provide maxQueued setting in camel, so I just fill a JIRA for it. https://issues.apache.org/jira/browse/CAMEL-7082 – Willem Jiang Dec 19 '13 at 01:41