I have a spring boot application which is running on embedded tomcat server. I want to know the default tomcat http threadpool size and how to check them.
After checking on various portal i got to know that we can add 'server.tomcat.max-threads' in the applications.properties file and control it.
But i want to understand what is the default size and how to find it.
You can find the default value for each property here for the latest Spring Boot version. In this case the property is server.tomcat.threads.max and the default value is Tomcat's default, which is 200.
Related
I have this requirement that I need to check if the java application (not web app) is running or down via bash script.
It is non springboot application as well. It is just a normal spring application that connects and listen to kafka, get the the object from the topic and call an API.
We thought of to use spring actuator to check the health however it is not a web application.
What is the recommended way to check a non-web and non-springboot application if it is up or down?
Please advise.
I've configured an application with togglz, with the application.properties externalized in a Spring Boot Config server. When I update a feature status on application.properties in the server and make a call to /actuator/refresh they return the feature changes, but the application doesn't change the status of the feature. If I restart the application the status changes.
Does anyone know if it is possible disable a feature without restart application, and didn't use togglz console?
thanks
Disable a feature in a database. If you are using default values: table "togglz" column "feature_enabled"
I am using spring boot 2 with PCF config server to use centrallized config. My microservice is basic crud rest service. What I noticed is that whenever a property is being changed and http post is being made on "actuator/refresh" endpoint, spring boot 2 drops all connection including active ones and rebuilds the connection pool. How can I avoid this? I am also using spring-boot-starter amqp and cloud bus to notify all my service instance to refresh the properties so it is also happening for http post on "actuator/bus-refresh".
Also to clarify, I didnot change any property related to datasource config, instead I am changing application specific property, so why does spring boot refreshing datasource, I did not understood.
How to configure Spring Boot Admin to log action. For example, I want Spring Boot Admin log action when someone change log level form INFO to DEBUG or when someone change configuration value in JMX tab and write wrong configure override the existing.
Do Spring Boot Admin has a feature to do that?
No it doesn't but you could write a zuul filter intercepting, analyzing the request to /api/applications/{id}/logfile and writing a log statement.
Spring Boot includes a number of additional features to help you
monitor and manage your application when it’s pushed to production.
You can choose to manage and monitor your application using HTTP
endpoints, with JMX or even by remote shell (SSH or Telnet). Auditing,
health and metrics gathering can be automatically applied to your
application.
Actuator HTTP endpoints are only available with a Spring MVC-based
application. In particular, it will not work with Jersey unless you
enable Spring MVC as well.
You can also activate a listener by invoking the SpringApplication.addListeners(…) method and passing the appropriate Writer object. This method also allows you to customize the file name and path via the Writer constructor.
Customize your requirement in Actuator
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready
Maven :
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>1.5.2.RELEASE</version>
</dependency>
http://www.baeldung.com/spring-boot-authentication-audit
We have a Spring Boot application that needs to send messages to a queue available on a remote HornetQ message broker.
I saw that Spring Boot supports HornetQ in embedded mode. However, there's only a minimal set of spring.hornetq.* properties that I can set up on application.properties of my Boot application.
The application must use a core bridge (store and forward), which is configured in a hornetq-configuration.xml file.
Question: what do I need to do to make the HornetQ embedded instance provided by Spring Boot use a hornetq-configuration.xml file that I created?