Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HystrixRuntimeException: timed-out and no fallback.] with root cause java.util.concurrent.TimeoutException: null #2009

Open
deepakThedeveloper opened this issue Dec 4, 2020 · 2 comments

Comments

@deepakThedeveloper
Copy link

I am getting above exceptio when invoking microservice via feign.

Feign:

Feign-core:10.10.1
Feign-hystrix:10.10.1
hystrix-core: 1.5.18
Spring.boot:2.3.5.RELEASE

Hystrix:

hystrix.command.default.execution.isolation.thread.timeoutInMilloseconds: 6000000

Exception:

com.netflix.hystrix.exception.HystrixRuntimeException: UserClient.getUserData() timed-out and no fallback aavilable with root-cause
Java.util.concurrent.TimeoutException: null

My calling service isn able to reach called service. Called service has successfully processed the data as well. I have given such a big timeout but still getting timeout exception.

Please help

@alibbbian
Copy link

alibbbian commented Dec 29, 2021

I have a problem like yours, too.

System.setProperty("hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds", "8000");

Try this, sure your config it works. I guess your config don't work, and I'm looking for other way to make it works.

#2024 (comment)

@carl-HelloWorld
Copy link

carl-HelloWorld commented Aug 5, 2024

Uploading 20240805-191551.jpg…

// Thread[main,5,main] org.springframework.beans.factory.support.AbstractBeanFactory#doGetBean
// create bean,get bean, acquire lock success
Thread[main,5,main]acquire lock success org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(java.lang.String, org.springframework.beans.factory.ObjectFactory) Thread[main,5,main]try acquire lock org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(java.lang.String, boolean) Thread[main,5,main]acquire lock success,org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(java.lang.String, boolean) ................. 2024-08-07 19:37:47.421 INFO 42320 --- [ main] com.netflix.hystrix.AbstractCommand : =============setInvocationStartTime1723030667421 2024-08-07 19:37:47.421 INFO 42320 --- [ hystrix-VersionInfoFeignClient-1,5,main] org.springframework.cloud.netflix.feign.support.SpringDecoder#decode // HttpMessageConverterExtractor extractor = new HttpMessageConverterExtractor(type, this.messageConverters.getObject().getConverters())
Thread[hystrix-VersionInfoFeignClient-1,5,main]try acquire lock org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(java.lang.String, boolean)
// wait hystrix timeout
2024-08-07 19:37:57.429 INFO 42320 --- [ HystrixTimer-1] com.netflix.hystrix.AbstractCommand : NOT_EXECUTED============================10000
com.netflix.hystrix.exception.HystrixRuntimeException: VersionInfoFeignClient#getServiceVersionInfo() timed-out and no fallback available.
at com.netflix.hystrix.AbstractCommand$22.call(AbstractCommand.java:821)
at com.netflix.hystrix.AbstractCommand$22.call(AbstractCommand.java:806)
Caused by: java.util.concurrent.TimeoutException
at com.netflix.hystrix.AbstractCommand.handleTimeoutViaFallback(AbstractCommand.java:999)
at com.netflix.hystrix.AbstractCommand.access$500(AbstractCommand.java:60)
at com.netflix.hystrix.AbstractCommand$12.call(AbstractCommand.java:612)
at com.netflix.hystrix.AbstractCommand$12.call(AbstractCommand.java:603)
at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:140)
... 15 more
Thread[main,5,main]org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.afterSingletonCreation
// release lock
Thread[hystrix-VersionInfoFeignClient-1,5,main]acquire lock success,org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(java.lang.String, boolean)
2024-08-07 19:37:57.512 INFO 42320 --- [foFeignClient-1] feign.SynchronousMethodHandler : 10075=============feigin response=============1723030677512
2024-08-07 19:37:57.532 WARN 42320 --- [ main] o.s.c.n.a.ArchaiusAutoConfiguration : No spring.application.name found, defaulting to 'application'

Create response message processing for feignclient, which relies on this. messageConverters. getObject (). getConverter() in SpringDecoder. decode to retrieve all converters in the Spring container. org.springframework.beans.factory.support.AbstractBeanFactory#isTypeMatch(java.lang.String, org.springframework.core.ResolvableType), Will obtain feignclient, feignclient is singletonsCurrentlyInCreation, resulting in inability to obtain lock, waiting for hystrix timeout

@PostConstruct
public void init() {
try {
int versionInfo = client.getServiceVersionInfo();
} catch(RuntimeException ex) {
ex.printStackTrace();
}
}

my issue has been resolved by implementing the SmartInitializingSingleton interface
Or the Application Runner OR ApplicationListener

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants