Feign调用时读取超时(ReadtimedoutexecutingGET)解决

更新时间:2023-07-14 08:42:14 阅读: 评论:0

Feign调⽤时读取超时(ReadtimedoutexecutingGET)解决
解决⽅式(很多⼈⽐较关注,所以放在最前⾯):
  因为Feign调⽤默认的超时时间为⼀分钟,⼀分钟接⼝不能返回就会抛出异常,所以在服务端的yml⽂件中增加如下配置即可解决:
# feign调⽤超时时间配置
feign:
client:
config:
default:
connectTimeout: 10000
readTimeout: 600000
问题描述:
  在SpringBoot项⽬中,进⾏海量数据导出时,会涉及到模块间调⽤,查询数据量有⽐较⼤,过⼀段时间客户端就会报如下异常(进⾏Feign调⽤时如果接⼝处理时间过长也会出现此异常):
服务端会报如下异常:
at Executing(FeignException.java:67)
at uteAndDecode(SynchronousMethodHandler.java:104)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
at com.sun.proxy.$portFormalUrHotline(Unknown Source)
at com.tinet.portFormalUrHotline(UrController.java:396)
at com.tinet.ller.UrController$$FastClassBySpringCGLIB$$2fbde74b.invoke(<generated>)
at lib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:100)
at com.tinet.bigboss.web.operatelog.OperateLogAspect.operateLogAdvice(OperateLogAspect.java:96)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
皮肤新陈代谢
flect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at flect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:174)
at
org.apache.shiro.spring.curity.interceptor.AopAllianceAnnotationsAuthorizingMethodInterceptor$1.proceed(AopAllianceAnnotationsAuthorizingMethodInterceptor.java:82) at org.apache.shiro.authz.aop.AuthorizingMethodInterceptor.invoke(AuthorizingMethodInterceptor.java:39)
at org.apache.shiro.spring.curity.interceptor.AopAllianceAnnotationsAuthorizingMethodInterceptor.invoke(AopAllianceAnnotationsAuthorizingMethodInterceptor.java:115) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvoc
ation.java:185)
at org.springframework.aop.interceptor.ExpoInvocationInterceptor.invoke(ExpoInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvidInterceptor.intercept(CglibAopProxy.java:688)
at com.tinet.ller.UrController$$EnhancerBySpringCGLIB$$portFormalUrHotline(<generated>)
at com.tinet.ller.UrController$$FastClassBySpringCGLIB$$2fbde74b.invoke(<generated>)
at lib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at
org.apache.shiro.spring.curity.interceptor.AopAllianceAnnotationsAuthorizingMethodInterceptor$1.proceed(AopAllianceAnnotationsAuthorizingMethodInterceptor.java:82) at org.apache.shiro.authz.aop.AuthorizingMethodInterceptor.invoke(AuthorizingMethodInterceptor.java:39)
at org.apache.shiro.spring.curity.interceptor.AopAllianceAnnotationsAuthorizingMethodInterceptor.invoke(AopAllianceAnnotationsAuthorizingMethodInterceptor.java:115) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvidInterceptor.intercept(CglibAopProxy.java:688)
at com.tinet.ller.UrController$$EnhancerBySpringCGLIB$$portFormalUrHotline(<generated>)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
flect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
美股怎么开户at flect.Method.invoke(Method.java:498)
at org.hod.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
at org.hod.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.hod.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.hod.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877)
at org.springframework.web.hod.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783)
at org.springframework.web.hod.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.rvlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
at org.springframework.web.rvlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.rvlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.rvlet.FrameworkServlet.doGet(FrameworkServlet.java:866)
at javax.rvlet.http.HttpServlet.rvice(HttpServlet.java:635)
at org.springframework.web.rvlet.FrameworkServlet.rvice(FrameworkServlet.java:851)
at javax.rvlet.http.HttpServlet.rvice(HttpServlet.java:742)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at at.websocket.rver.WsFilter.doFilter(WsFilter.java:52)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.shiro.web.rvlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.shiro.web.uteChain(AdviceFilter.java:108)
at org.apache.shiro.web.rvlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.rvlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.shiro.web.uteChain(AdviceFilter.java:108)
at org.apache.shiro.web.rvlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)椒麻鸡翅
at org.apache.shiro.web.rvlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.ics.web.rvlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:158) at org.springframework.ics.web.rvlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:126) at org.springframework.ics.web.rvlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:111)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.shiro.web.rvlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at org.apache.shiro.web.uteChain(AdviceFilter.java:108)
at org.apache.shiro.web.rvlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.rvlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.rvlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.uteChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.rvlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)辞退通知
at org.apache.shiro.subject.ute(DelegatingSubject.java:387)
at org.apache.shiro.web.rvlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.rvlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
出纳工作总结个人at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.ace.rvlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.tinet.bigboss.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:38)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
剪纸的由来at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.ssion.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:147)
at org.springframework.ssion.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)文化氛围
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBa.invoke(AuthenticatorBa.java:496)
at org.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.tor.CoyoteAdapter.rvice(CoyoteAdapter.java:342)
at http11.Http11Processor.rvice(Http11Processor.java:803)
at AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
at at.util.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
at at.util.SocketProcessorBa.run(SocketProcessorBa.java:49)
at urrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at urrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at at.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caud by: java.SocketTimeoutException: Read timed out
at java.SocketInputStream.socketRead0(Native Method)
at java.SocketInputStream.socketRead(SocketInputStream.java:116)
at ad(SocketInputStream.java:170)
at ad(SocketInputStream.java:141)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
at org.apache.http.impl.adLine(SessionInputBufferImpl.java:282)
at org.apache.DefaultHttpResponParr.parHead(DefaultHttpResponParr.java:138)
at org.apache.DefaultHttpResponParr.parHead(DefaultHttpResponParr.java:56)
at org.apache.http.impl.io.AbstractMessageParr.par(AbstractMessageParr.java:259)
at org.apache.http.iveResponHeader(DefaultBHttpClientConnection.java:163) at org.apache.iveResponHeader(CPoolProxy.java:165)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveRespon(HttpRequestExecutor.java:273)
at org.apache.http.ute(HttpRequestExecutor.java:125)
at org.apache.ute(MainClientExec.java:272)
at org.apache.ute(ProtocolExec.java:185)
at org.apache.ute(RetryExec.java:89)
at org.apache.ute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.ute(CloableHttpClient.java:83)
少儿科学
at org.apache.http.impl.ute(CloableHttpClient.java:108)
at org.apache.http.impl.ute(CloableHttpClient.java:56)
at feign.ute(ApacheHttpClient.java:87)
at uteAndDecode(SynchronousMethodHandler.java:97)
... 137 more

本文发布于:2023-07-14 08:42:14,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1080964.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:时间   导出   配置   过长   涉及   总结   返回   放在
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图