apache restlet 连接器过载 [英] apache restlet connector overload
问题描述
我在 from("restlet:http/myLink") 子句的骆驼路线中使用 restlet.当用户的请求每秒超过 10 个时,我开始收到错误处理请求,例如org.restlet.engine.connector.Controller run信息:检测到连接器过载.停止接受新作品"
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"
我认为,该错误是由线程数、请求查询的大小或数量或类似原因引起的.我尝试将 spring 配置中的 maxThreads 参数设置为不同的值
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>
但我没有成功.在文档 http://camel.apache.org/restlet.html 中,我没有找到蚂蚁参数用于设置请求队列的大小\数量.我需要帮助:(
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 :(
附言camel-restlet 版本是 2.12.2
P.S. camel-restlet version is 2.12.2
更新
我尝试将大数字设置为 maxThreads,maxConnectionsPerHost,maxTotalConnections,但没用.如果像这样将 org.restlet.Component 注入到骆驼的配置中:
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>
如何覆盖使用 BaseHelper 参数的属性?
How I can override properties, that use BaseHelper params?
推荐答案
经过options 也是lowThread.但我发现当前发布的骆驼不支持它.
After go through the options of lowThread as well. But I found current released camel doesn't support it.
这篇关于apache restlet 连接器过载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!