question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Application context keeps refreshing for cloud config server after fixed duration

See original GitHub issue

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:-

2016-06-23 16:03:35,526 INFO  [XNIO-3 task-126] org.springframework.context.annotation.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@50b345ea: startup date [Thu Jun 23 16:03:35 IST 2016]; root of context hierarchy
2016-06-23 16:03:35,528 INFO  [XNIO-3 task-126] org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2016-06-23 16:03:35,550 INFO  [XNIO-3 task-126] org.springframework.context.annotation.AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@50b345ea: startup date [Thu Jun 23 16:03:35 IST 2016]; root of context hierarchy
2016-06-23 16:05:20,763 INFO  [XNIO-3 task-133] org.springframework.context.annotation.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@715e3d3a: startup date [Thu Jun 23 16:05:20 IST 2016]; root of context hierarchy
2016-06-23 16:05:20,766 INFO  [XNIO-3 task-133] org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ekfliucommented, Aug 12, 2016

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. Thanks Again.

0reactions
ezraroicommented, Feb 15, 2017

looks like yes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application context keeps refreshing for cloud config server after ...
The spring application context gets refreshed after fixed interval of time ~15s. Issue#1 -- I would like to know if this is desired...
Read more >
2. Spring Cloud Context: Application Context Services
2.9 Refresh Scope. When there is a configuration change, a Spring @Bean that is marked as @RefreshScope gets special treatment.
Read more >
When a spring cloud config item is refreshed, is there a way to ...
1 Answer 1 ... If you update the config file that the spring cloud config server is serving, and then call the refresh...
Read more >
Spring Cloud Config Refresh Strategies - Soshace
When it comes to refreshing the properties in the application context, there are two steps again; reloading the property sources in the ...
Read more >
Refreshable Configuration using Spring Cloud Config Server ...
But if you want to "reload" / "refresh" those beans without restarting the application, when a properties coming from the Spring Cloud Config...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found