com.netflix.zuul.exception.ZuulException: Hystrix Readed time out 504 Error
Spring Cloud Zuul 을 사용한 API Gateway 에서
Rest API 호출 시, response 의 Data 가 커서 response 응답이 오래 걸리는 문제
Rest API 호출 Error Log
{
"timestamp": "2020-02-18T10:16:18.507+0000",
"status": 504,
"error": "Gateway Timeout",
"message": "com.netflix.zuul.exception.ZuulException: Hystrix Readed time out"
}
Zuule Server Error Log
com.netflix.zuul.exception.ZuulException:
at org.springframework.cloud.netflix.zuul.filters.post.SendErrorFilter.findZuulException(SendErrorFilter.java:114)
at org.springframework.cloud.netflix.zuul.filters.post.SendErrorFilter.run(SendErrorFilter.java:76)
application.yml (or bootstrap.yml)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
zuul:
routes:
abc: // text 는 아무거나 사용 가능
path: /abc/**
serviceId: abc-service
myusers-service: // serviceId 명시
ribbon:
ConnectTimeout: 1000
ReadTimeout: 3000
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
|
https://cloud.spring.io/spring-cloud-netflix/multi/multi__router_and_filter_zuul.html
8. Router and Filter: Zuul
Routing is an integral part of a microservice architecture. For example, / may be mapped to your web application, /api/users is mapped to the user service and /api/shop is mapped to the shop service. Zuul is a JVM-based router and server-side load balancer
cloud.spring.io