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

Internal server error when the failover timeout is set to 0 #1038

Closed
aurelien-pacaud opened this Issue Jan 26, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@aurelien-pacaud

aurelien-pacaud commented Jan 26, 2018

When failover is enabled the timeout can't be set to 0. An internal server error is thrown for each call, see stacktrace below:

Caused by: java.lang.IllegalArgumentException: Cannot schedule a timer with delay < 1 ms
at io.vertx.core.impl.VertxImpl.scheduleTimeout(VertxImpl.java:462)
at io.vertx.core.impl.VertxImpl.setTimer(VertxImpl.java:325)
at io.vertx.circuitbreaker.impl.CircuitBreakerImpl.executeOperation(CircuitBreakerImpl.java:327)
at io.vertx.circuitbreaker.impl.CircuitBreakerImpl.executeAndReportWithFallback(CircuitBreakerImpl.java:231)
at io.vertx.circuitbreaker.impl.CircuitBreakerImpl.executeWithFallback(CircuitBreakerImpl.java:373)
at io.vertx.circuitbreaker.impl.CircuitBreakerImpl.execute(CircuitBreakerImpl.java:378)
at io.gravitee.gateway.http.core.invoker.failover.FailoverInvoker.invoke(FailoverInvoker.java:63)
at io.gravitee.gateway.handlers.api.ApiReactorHandler.lambda$handleClientRequest$6(ApiReactorHandler.java:156)
at io.gravitee.gateway.policy.impl.RequestPolicyChainProcessor.execute(RequestPolicyChainProcessor.java:65)
at io.gravitee.gateway.policy.impl.RequestPolicyChainProcessor.lambda$execute$0(RequestPolicyChainProcessor.java:57)
at io.gravitee.gateway.policy.NoOpPolicyChain.doNext(NoOpPolicyChain.java:41)
at io.gravitee.gateway.policy.impl.RequestPolicyChainProcessor.execute(RequestPolicyChainProcessor.java:63)
at io.gravitee.gateway.policy.impl.RequestPolicyChainProcessor.lambda$execute$0(RequestPolicyChainProcessor.java:57)
at io.gravitee.gateway.policy.NoOpPolicyChain.doNext(NoOpPolicyChain.java:41)
at io.gravitee.gateway.policy.impl.RequestPolicyChainProcessor.execute(RequestPolicyChainProcessor.java:63)
at io.gravitee.gateway.policy.impl.RequestPolicyChainProcessor.lambda$execute$0(RequestPolicyChainProcessor.java:57)
at io.gravitee.gateway.policy.impl.PolicyChain.doNext(PolicyChain.java:76)
at io.gravitee.gateway.policy.impl.StreamablePolicyChain.doNext(StreamablePolicyChain.java:51)
at io.gravitee.policy.keyless.KeylessPolicy.onRequest(KeylessPolicy.java:39)
... 64 common frames omitted

Your Environment

  • Version used: 1.12.4

@NicolasGeraud NicolasGeraud added this to the 1.13.0 milestone Jan 26, 2018

NicolasGeraud added a commit to gravitee-io/gravitee-definition that referenced this issue Jan 26, 2018

NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jan 26, 2018

@NicolasGeraud

This comment has been minimized.

Member

NicolasGeraud commented Jan 26, 2018

So there is 2 parameters : max retry and timeout
The max-retry iterate over each endpoints, so the value 0 doesn't make sense.
The Vertx CircuitBreaker doesn't allow 0. Its default value is 10000. This will become our new default value.

NicolasGeraud added a commit to gravitee-io/gravitee-gateway that referenced this issue Jan 26, 2018

NicolasGeraud added a commit to gravitee-io/gravitee-management-webui that referenced this issue Jan 26, 2018

@NicolasGeraud NicolasGeraud self-assigned this Jan 26, 2018

brasseld added a commit to gravitee-io/gravitee-management-webui that referenced this issue Jan 27, 2018

brasseld added a commit to gravitee-io/gravitee-gateway that referenced this issue Jan 27, 2018

brasseld added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jan 27, 2018

brasseld added a commit to gravitee-io/gravitee-definition that referenced this issue Jan 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment