Netflix / zuul

Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more.
Apache License 2.0
13.56k stars 2.4k forks source link

OkToRetryOnAllOperations doesn't work. Post request can't be retried. #665

Closed oaHeZgnoS closed 2 months ago

oaHeZgnoS commented 5 years ago

My env: SpringBoot 2.1.3, SpringCloud Greenwich.SR2, jdk1.8.

My configuration: `ribbon.restclient.enabled=true

开启重试机制

spring.cloud.loadbalancer.retry.enabled=true

请求连接的超时时间

spider-source.ribbon.ConnectTimeout=250 hystrix.command.default.execution.isolation.thread.timeoutinMilliseconds=8000

请求处理的超时时间

spider-source.ribbon.ReadTimeout=3000

对所有操作请求都进行重试,默认false,只有get请求会重试

spider-source.ribbon.OkToRetryOnAllOperations=true

指定请求重试开关,该属性未被使用,疑似bug

spider-source.ribbon.RequestSpecificRetryOn=true

对当前实例的重试次数

spider-source.ribbon.MaxAutoRetries=3

切换实例的重试次数

spider-source.ribbon.MaxAutoRetriesNextServer=1`

Get request can be retried. Post can't be retried. Please help.

oaHeZgnoS commented 5 years ago

Whether Separating from eureka alone using Ribbon, or using in SpringCloud's zuul, get request can be retried and post can't be retried.

yan-khonski-it commented 5 years ago

I also faced this bug. I had a client - Postman. I had Zuul Proxy in Spring cloud gateway. I had another service in python which ran in uWSGI web server.

Postman made request to Zuul which forwarded it to uswgi. It worked with GET request. It worked with Post request. But when I made second POST request, it failed. I opened a related issue -> https://github.com/Netflix/zuul/issues/678

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 months ago

This issue was closed because it has been stalled for 7 days with no activity.