spring-cloud-feign - FeignClient 在 SpringBoot 应用程序中出现“503 Service Unavailable”错误
问题描述
我有两个简单的服务,服务 A 使用 feignclient 调用服务 B。这两个服务真的很简单,但是我在调用服务 B 时经常遇到 503 Service Unavailable 错误。第一次调用总是有效,但是这个错误发生在第二次调用。没有特殊配置,使用默认配置。有谁知道如何解决这个问题?
feign:
httpclient:
connection-timeout: 10000
read-timeout: 60000
max-connections: 100
max-connections-per-route: 100
enabled: true
client:
config:
default:
connect-timeout: 60000
read-timeout: 60000
logger-level: full
hystrix:
enabled: true
hystrix:
command:
default:
execution:
timeout:
enabled: false
isolation:
thread:
timeoutInMilliseconds: 10000
others:
execution:
timeout:
enabled: true
isolation:
thread:
timeoutInMilliseconds: 3000
解决方案
推荐阅读
- scala - 执行目标 org.apache.maven.plugins:maven-assembly-plugin:2.5:single failed.: NullPointerException
- codeigniter - 我的网址被重定向到其他链接
- python - 如何在 sqlalchemy 中进行数据库模式迁移?
- javascript - Javascript通过它的背景图像获取div?
- python - Python MySQL 连接器:caching_sha2_password 插件
- c++ - 朋友 c++ 不与私人成员一起工作
- ruby-on-rails - 如何使用rails清除日志?
- javascript - 在node.js中通过post方法发送数组数据,如何在控制台上打印我试过这个
- oracle - 数据库链接使用好或坏
- php - 多个中间件路由在 laravel 5.6 中不起作用