问题描述
hytrix impl which i used into a application its a common class which all request use and enable hytrix by adding filters.Basically problem is when we put load on site the threads becomes high and on 100 users site will goes gatewaytimeout. Plz Help. I Shared the Impl of hystrix and Properties which I Used for Hystrix.
------这些是我用于hystrix的属性------
execution.isolation.thread.timeoutInMilliseconds = 60000
execution.timeout.enabled = false
execution.isolation.strategy =线程
hystrix.command.default.execution.timeout.enabled = false
execution.isolation.thread.timeoutInMilliseconds = 400
hystrix.command.default.fallback.enabled = true
hystrix.command.default.circuitBreaker.enabled = false
hystrix.command.default.circuitBreaker.forceClosed = false
hystrix.command.default.circuitBreaker.sleepWindowInMilliseconds = 5000
hystrix.command.default.circuitBreaker.requestVolumeThreshold = 20
hystrix.command.default.metrics.rollingStats.timeInMilliseconds = 80000
hystrix.threadpool.default.coreSize = 150
#hystrix.threadpool.default.keepAliveTimeMinutes = 1
hystrix.threadpool.default.allowMaximumSizetodivergeFromCoreSize = true
hystrix.threadpool.default.maxQueueSize = 100000
hystrix.threadpool.default.queueSizeRejectionThreshold = 100000
Hystrix的偶像
@Override
public void doFilter(ServletRequest request,ServletResponse response,FilterChain chain) throws IOException,servletexception {
HystrixRequestContext context = HystrixRequestContext.initializeContext();
SecurityContextHystrixRequestvariable.getInstance().set(SecurityContextHolder.getContext());
try {
chain.doFilter(request,response);
} catch(Throwable bce){
LOGGER.error("Some exception",bce);
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)