ThreeMammals / Ocelot

.NET API Gateway
https://www.nuget.org/packages/Ocelot
MIT License
8.32k stars 1.63k forks source link

About http 503 error #138

Closed Cglvzh closed 6 years ago

Cglvzh commented 6 years ago

Hi,I hosted Ocelot on IIS,but sometimes,my request will be received 503 error. And only one interface request error, the other normal.

This is my configuration information

"DownstreamPathTemplate": "/api/{root}/",
      "DownstreamScheme": "http",
      "DownstreamPort": 8878,
      "DownstreamHost": "localhost",
      "UpstreamPathTemplate": "/api/{root}/",
      "UpstreamHttpMethod": [
        "Post",
        "Get"
      ],
      "QoSOptions": {
        "ExceptionsAllowedBeforeBreaking": 3,
        "DurationOfBreak": 10,
        "TimeoutValue": 10000
      }

This is my log information

2017-11-01 10:04:19.6185|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:05:40.1941|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:07:19.8178|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:08:51.6621|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:09:30.3553|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:09:50.3464|Ocelot.Requester.HttpClientHttpRequester|ERROR|Error in CircuitBreakingDelegatingHandler.SendAync : OcelotRequestId - not set 2017-11-01 10:09:50.3464|Ocelot.Requester.QoS.PollyQoSProvider|ERROR|.Breaker logging: Breaking the circuit for 10ms! : OcelotRequestId - not set 2017-11-01 10:09:50.3464|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:09:50.3464|Ocelot.Requester.HttpClientHttpRequester|ERROR|Error in CircuitBreakingDelegatingHandler.SendAync : OcelotRequestId - not set 2017-11-01 10:09:50.3484|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:09:50.3484|Ocelot.Requester.QoS.PollyQoSProvider|ERROR|.Breaker logging: Breaking the circuit for 10ms! : OcelotRequestId - not set 2017-11-01 10:09:50.3484|Ocelot.Requester.HttpClientHttpRequester|ERROR|Error in CircuitBreakingDelegatingHandler.SendAync : OcelotRequestId - not set 2017-11-01 10:09:50.3484|Ocelot.Requester.QoS.PollyQoSProvider|ERROR|.Breaker logging: Breaking the circuit for 10ms! : OcelotRequestId - not set 2017-11-01 10:09:50.3484|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:09:50.3484|Ocelot.Requester.HttpClientHttpRequester|ERROR|Error in CircuitBreakingDelegatingHandler.SendAync : OcelotRequestId - not set 2017-11-01 10:09:50.3484|Ocelot.Requester.HttpClientHttpRequester|ERROR|Error in CircuitBreakingDelegatingHandler.SendAync : OcelotRequestId - not set 2017-11-01 10:09:50.3484|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:09:50.3484|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:10:09.0995|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:10:09.2555|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:10:10.5656|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:10:12.2067|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:14:01.5568|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:14:49.6555|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:38.5943|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:40.1034|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:41.1325|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:42.2255|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:45.9698|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:46.4198|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:46.6078|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:47.9829|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:50.1180|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:50.3100|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:51.7261|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:54.0042|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:54.6903|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:54.9713|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:15:58.1215|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:16:18.0886|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set 2017-11-01 10:16:19.2037|Ocelot.Responder.Middleware.ResponderMiddleware|ERROR|1 pipeline errors found in ResponderMiddleware. Setting error response status code : OcelotRequestId - not set

TomPallister commented 6 years ago

@Cglvzh for some reason the circuit breaker is kicking in hence the 503...maybe @geffzhang can help? Or I will look at it after I have finished the .net core 2.0 upgrade.

Cglvzh commented 6 years ago

Ok,Thank You.I will try to reproduce the problem in the test environment.

TomPallister commented 6 years ago

@Cglvzh did you ever get to the bottom of this?

saitejaprattipati commented 5 years ago

@Cglvzh Hi, I am getting same error can you please tell me the solution that you have done to solve it.