-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Application context keeps refreshing for cloud config server after fixed duration #423
Comments
Config server does not do polling. Do you have config clients that get |
Apologies for replying late here. |
@spencergibb do you think I've to develop another health check point for consul in this case to avoid application refresh or we can achieve this by any other means? |
Adding some debug information:- |
Solved this temporarily by disabling the config-server endpoint for now, applying spring.cloud.config.server.health.enabled=false in bootstrap.yml. Earlier I applied in application.yml but it did not work as had a dependency of spring cloud config in my project. Keeping this issue open as I'm waiting to see if refreshing / reloading the spring application context is avoidable while doing a health check. |
I also getting this issue where did you put spring.cloud.config.server.health.enabled? this is not valid properties in my config application or my client application? why would consul health check make config reload entire context? this does not make any sense. |
@ekfliu it's pretty clear the answers to your question in the comments above.
The health check of the application tries to get configuration from config server, it consul is pinging |
okay but the issue is spring.cloud.config.server.health.enabled is not considered to be a valid property in my application in both the config or the client application. I put the settings in anyway but it does not stop the config refresh. This application originally uses eureka and works fine. but after moving to consul i kept getting this intermittent timeout on my zuul proxy service. I am not sure if this is related to config refreshing or not, but trying to remove all the variables to debug this issue. |
okay looks like you need it on both on the config server and the client application. Thanks |
okay the actual settings that i got it to work is health:config:enabled: false in the application.yml for both the config server and the client application. now when manually hitting the url http://your-service/health used by consul it no longer check the server for new configs. |
Hi all, one thing that i didn't get yet from the answers. |
@ezraroi that's an implementation detail of how config server works. Something is hitting it every few seconds. Likely a monitoring solution hitting |
@spencergibb i understand this, but isn't it possible to do the health check without recreating the context? If there is no such case i think it is better to not allow it at all as this makes the configuration service to become not responsive |
@ezraroi it's not the main application context. |
@spencergibb , ok.. but still looks like it is making the configuration service very loaded and prevents it to answer calls |
|
Yes , i had... i disabled this after reading in this issue.. It helped reducing the load from the configuration service |
Can we close this then? |
looks like yes |
The spring application context gets refreshed after fixed interval of time ~15s.
Issue#1 -- I would like to know if this is desired behavior to reload the context continously. Does @EnableConfigServer keeps polling for the configurations? If not what is the way to disable it. I see it happens due to the health check but using property "spring.cloud.config.server.health.enabled=false" did not have any affect.
Issue#2 -- This causes extra noise in the logs as well. Any way to disable them apart from putting custom filter in logback?
Spring boot version:- 1.3.5.RELEASE
Spring cloud version:- 1.0.4.RELEASE
Example logs:-
The text was updated successfully, but these errors were encountered: