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

Document setting max semaphores for zuul #1130

Open
HoussamKASSAH opened this Issue Jun 24, 2016 · 23 comments

Comments

Projects
None yet
3 participants
@HoussamKASSAH

HoussamKASSAH commented Jun 24, 2016

Dear all,

I want to run a multiple number of concurrent requests through the Gateway Zuul with Eureka servers
where i faced this Error Internal server error 500 any solution or suggestion are welcome and Thank you

Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: YYYYY could not acquire a semaphore for execution and no fallback available.

Caused by: java.lang.RuntimeException: could not acquire a semaphore for execution
@spencergibb

This comment has been minimized.

Show comment
Hide comment
@spencergibb

spencergibb Jun 24, 2016

Member

Set zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors>. It defaults to 100.

Member

spencergibb commented Jun 24, 2016

Set zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors>. It defaults to 100.

@spencergibb spencergibb changed the title from com.netflix.zuul.exception.ZuulException: Forwarding error to Document setting max semaphores for zuul Jun 24, 2016

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

I'am using spring cloud Netflix 1.1.2 version tried to use your suggestion on my properties file but i can't find zuul.eureka. ?

HoussamKASSAH commented Jun 24, 2016

I'am using spring cloud Netflix 1.1.2 version tried to use your suggestion on my properties file but i can't find zuul.eureka. ?

@spencergibb

This comment has been minimized.

Show comment
Hide comment
@spencergibb

spencergibb Jun 24, 2016

Member

What do you mean "i can't find zuul.eureka."?

Member

spencergibb commented Jun 24, 2016

What do you mean "i can't find zuul.eureka."?

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

what I understand from you is to add zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors> in my proporties file of my zuul gateway right !

HoussamKASSAH commented Jun 24, 2016

what I understand from you is to add zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors> in my proporties file of my zuul gateway right !

@spencergibb

This comment has been minimized.

Show comment
Hide comment
@spencergibb
Member

spencergibb commented Jun 24, 2016

Yes.

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

i have

          zuul.host.max-per-route-connections= xxx
          zuul.host.max-total-connections= xxxx
          ..............

and other properties but i can't see zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors>

HoussamKASSAH commented Jun 24, 2016

i have

          zuul.host.max-per-route-connections= xxx
          zuul.host.max-total-connections= xxxx
          ..............

and other properties but i can't see zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors>

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

witch maven or zuul version that i can use to got the properties of the semaphore !

HoussamKASSAH commented Jun 24, 2016

witch maven or zuul version that i can use to got the properties of the semaphore !

@spencergibb

This comment has been minimized.

Show comment
Hide comment
@spencergibb

spencergibb Jun 24, 2016

Member

I don't understand "i can't see zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors>". What do you mean you can't see it?

Member

spencergibb commented Jun 24, 2016

I don't understand "i can't see zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors>". What do you mean you can't see it?

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

in my properties file when I tap zuul.<space> I got the list of properties but there's no``zuul.eureka..semaphore.maxSemaphores=`
I should to download a newst version of zuul to got it or what can I do !

HoussamKASSAH commented Jun 24, 2016

in my properties file when I tap zuul.<space> I got the list of properties but there's no``zuul.eureka..semaphore.maxSemaphores=`
I should to download a newst version of zuul to got it or what can I do !

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

does it work just if I add it to a Metadata or I should to install another version:
Create metadata for 'zuul.eureka.XXXXX.semaphore.maxSemaphores'.

HoussamKASSAH commented Jun 24, 2016

does it work just if I add it to a Metadata or I should to install another version:
Create metadata for 'zuul.eureka.XXXXX.semaphore.maxSemaphores'.

@spencergibb

This comment has been minimized.

Show comment
Hide comment
@spencergibb

spencergibb Jun 24, 2016

Member

It will not be part of any completion. It should just work.

Member

spencergibb commented Jun 24, 2016

It will not be part of any completion. It should just work.

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

I think it's work but I got this

com.netflix.zuul.exception.ZuulException: Forwarding error
Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: xxxxxxx short-circuited and no fallback available.
Caused by: java.lang.RuntimeException: Hystrix circuit short-circuited and is OPEN

any help ideas from your experience what cause it !

HoussamKASSAH commented Jun 24, 2016

I think it's work but I got this

com.netflix.zuul.exception.ZuulException: Forwarding error
Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: xxxxxxx short-circuited and no fallback available.
Caused by: java.lang.RuntimeException: Hystrix circuit short-circuited and is OPEN

any help ideas from your experience what cause it !

@spencergibb

This comment has been minimized.

Show comment
Hide comment
@spencergibb

spencergibb Jun 24, 2016

Member

Your downstream service has failed so often the circuit is open. This is what hystrix does.

Member

spencergibb commented Jun 24, 2016

Your downstream service has failed so often the circuit is open. This is what hystrix does.

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

I don't no from problems to another but I want to fix it now :) thanks for your help :)

com.netflix.zuul.exception.ZuulException: Forwarding error
Caused by: com.netflix.client.ClientException: null
Caused by: com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out
Caused by: java.net.SocketTimeoutException: Read timed out

HoussamKASSAH commented Jun 24, 2016

I don't no from problems to another but I want to fix it now :) thanks for your help :)

com.netflix.zuul.exception.ZuulException: Forwarding error
Caused by: com.netflix.client.ClientException: null
Caused by: com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out
Caused by: java.net.SocketTimeoutException: Read timed out
@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

my zuul config
in addition to your zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors>
I have

zuul.host.max-per-route-connections=2000
zuul.host.max-total-connections=2000
zuul.host.socket-timeout-millis=2000000
zuul.host.connect-timeout-millis=10000
hystrix.command.default.execution.isolation.strategy=THREAD
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=200000000000
health.hystrix.enabled=true 

HoussamKASSAH commented Jun 24, 2016

my zuul config
in addition to your zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors>
I have

zuul.host.max-per-route-connections=2000
zuul.host.max-total-connections=2000
zuul.host.socket-timeout-millis=2000000
zuul.host.connect-timeout-millis=10000
hystrix.command.default.execution.isolation.strategy=THREAD
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=200000000000
health.hystrix.enabled=true 
@spencergibb

This comment has been minimized.

Show comment
Hide comment
@spencergibb

spencergibb Jun 24, 2016

Member

your service calls are timing out. Try setting ribbon.ReadTimeout.

Member

spencergibb commented Jun 24, 2016

your service calls are timing out. Try setting ribbon.ReadTimeout.

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

just added this

ribbon.eureka.enabled=true
ribbon.ServerListRefreshInterval=1000
ribbon.ConnectTimeout=200000
ribbon.ReadTimeout=200000

and got

com.netflix.zuul.exception.ZuulException: Forwarding error
Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: xxxxx timed-out and no fallback available.
Caused by: java.util.concurrent.TimeoutException: null

HoussamKASSAH commented Jun 24, 2016

just added this

ribbon.eureka.enabled=true
ribbon.ServerListRefreshInterval=1000
ribbon.ConnectTimeout=200000
ribbon.ReadTimeout=200000

and got

com.netflix.zuul.exception.ZuulException: Forwarding error
Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: xxxxx timed-out and no fallback available.
Caused by: java.util.concurrent.TimeoutException: null
@spencergibb

This comment has been minimized.

Show comment
Hide comment
@spencergibb

spencergibb Jun 24, 2016

Member

THREAD isolation isn't supported currently in zuul. I'm unsure why you are still getting timeouts.

Member

spencergibb commented Jun 24, 2016

THREAD isolation isn't supported currently in zuul. I'm unsure why you are still getting timeouts.

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

have you any idea about the parameter of read timeout and connect timeout suggested or recommended for supporting more than 1000 request through zuul Gateway !

HoussamKASSAH commented Jun 24, 2016

have you any idea about the parameter of read timeout and connect timeout suggested or recommended for supporting more than 1000 request through zuul Gateway !

@spencergibb

This comment has been minimized.

Show comment
Hide comment
@spencergibb

spencergibb Jun 24, 2016

Member

You have them set. Without seeing a sample project, I'm not sure what else I can do.

Member

spencergibb commented Jun 24, 2016

You have them set. Without seeing a sample project, I'm not sure what else I can do.

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 24, 2016

In all case thanks a lot for your help, but I didn't understand zuul doesn't support more than 1000 request at the same time
I run 1000 request just 835 arrived to do their job and I got the error mentioned above, I will try to play with the parameter of read timeout connect timeout and I will see but I don't think that it's that the problem.
have a nice day

HoussamKASSAH commented Jun 24, 2016

In all case thanks a lot for your help, but I didn't understand zuul doesn't support more than 1000 request at the same time
I run 1000 request just 835 arrived to do their job and I got the error mentioned above, I will try to play with the parameter of read timeout connect timeout and I will see but I don't think that it's that the problem.
have a nice day

@HoussamKASSAH

This comment has been minimized.

Show comment
Hide comment
@HoussamKASSAH

HoussamKASSAH Jun 27, 2016

Hey @spencergibb it's work by following this config for the read timeout parameter
execTime < hystrixTimeout < readTimeout --> OK (no leak)
from https://github.com/spring-cloud/spring-cloud-netflix/issues/327
but I'am asking if you have more details information or reference link to understand more why we should use one of those scenario test to avoid the HTTP connection leak timeout !

HoussamKASSAH commented Jun 27, 2016

Hey @spencergibb it's work by following this config for the read timeout parameter
execTime < hystrixTimeout < readTimeout --> OK (no leak)
from https://github.com/spring-cloud/spring-cloud-netflix/issues/327
but I'am asking if you have more details information or reference link to understand more why we should use one of those scenario test to avoid the HTTP connection leak timeout !

@prontera

This comment has been minimized.

Show comment
Hide comment
@prontera

prontera Nov 29, 2016

zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors> works for me. (Brixton SR6)

prontera commented Nov 29, 2016

zuul.eureka.<serviceId>.semaphore.maxSemaphores=<maxSemaphors> works for me. (Brixton SR6)

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