I am developing application server using spring boot app but now I want to know what is the default maximum (client request) thread pool size in spring and how can I customize that value?
Assuming that you're using embedded Tomcat, Spring Boot provides a property to control the size of the client request thread pool. Its default value is zero which leaves Tomcat to use its default of 200. If you're using Spring Boot 2.3 or later, this property is named server.tomcat.threads.max. In earlier versions of Spring Boot, the property is named server.tomcat.max-threads.
To customise the size of this thread pool you should specify a non-zero value for the property in your application.properties or application.yml file.
As server.tomcat.max-threads is deprecated since Springboot 2.3, now use server.tomcat.threads.max in your Spring application.properties. Default is 200.
Related
We are facing ORA-08177 issue sometimes. Even Though we change isolation level with batch.repository.isolationlevelforcreate=ISOLATION_READ_COMMITTED, It did not solve the problem.
Spring batch version is 4.1.2.RELEASE.
Do you have any idea?
If you are using Spring Boot 2.7 or later, you can use the spring.batch.jdbc.isolation-level-for-create application property to set the desired transaction isolation level:
The transaction isolation level of Spring Batch can be configured using the spring.batch.jdbc.isolation-level-for-create property.
For example, you can add the following property to your application.properties file:
spring.batch.jdbc.isolation-level-for-create=read_committed
Spring Cloud Config uses Spring Cloud Bus uses Spring Cloud Stream to push configuration change events to clients.
My question - since I was yet to find it - is: what kind of queues does Spring Cloud Config create when it starts up? I noticed that it creates topics/queues automatically, but are they temporary, i.e. bound to the lifecycle of the server/client or durable. Do they have to be removed manually?
EDIT: I am using Spring Cloud Hoxton.SR3 with Spring Boot 2.2.5.RELEASE (or higher)
Thanks in advance!
I am building multi-tenancy application with multiple database. I am facing few problems with regard to database pool size (database connection exceeds).
With regard to Spring boot Hiberante JPA, what is the default pool size for datasource? How many connection does hibernate creates by default with given database details in property files?
In wildfly activemq subsystem, I have defined min-pool-size to 40 in pooled-connection-factory. Deploy artemis externally and define ip and port in wildfly standalone-full-ha.xml. After starting artemis and wildfly server, how can i verify that wildfly is created connection (based on min-pool-size property) once server started?
I believe the pool in Wildfly is filled lazily so I don't believe that just starting Wildfly will necessarily cause a connection to be created. Something actually needs to use the pool to ensure it's working as expected. Confirming that the application using the pool is working as expected is the best way to know whether or not the pool is working as expected.
Also, I don't think the pooled-connection-factory actually exposes any metrics via the Wildfly management interfaces so that's probably why you're not seeing anything for it.
We are using Feign on top of Ribbon and Eureka.
We noticed a com.netflix.niws.client.http.RestClient instance is automatically created for each Feign client but never used. Instead, the Feign.Builder creates a feign.ribbon.RibbonClient that delegates the actual HTTP call to a feign.Client.Default instance. The latter uses standard Java HttpConnection without any pooling feature.
Unfortunately, the creation of these apparently useless RestClient instances (one per feign client) comes with its own Apache HttpClient, its own connection pool, housekeeping thread and metrics stuff...
A quick look at the /metrics actuator endpoint shows metrics like:
counter.servo.<client name>_createnew: 0
counter.servo.<client name>_delete: 0
counter.servo.<client name>_release: 0
counter.servo.<client name>_request: 0
counter.servo.<client name>_reuse: 0
Those metrics are created by com.netflix.http4.NamedConnectionPool. Their value stay at 0 whatever the activity.
Did someone experienced the same behaviour?
Why are these RestClient instances created for each feign client and never used?
Observed behaviour was caused by issue https://github.com/spring-cloud/spring-cloud-netflix/issues/312.
Fix is scheduled to be included in Spring Cloud 1.0.2