Comments (8)
@KafkaProServerless Please provide a reproducible example.
from reactor-netty.
Thank you @violetagg for the answer.
The project is quite big.
While I am removing things, may I ask if there are anything I can try to pin down the issue?
Change some memory limit? Enable debug log? remove some dependencies?
from reactor-netty.
@KafkaProServerless Your project uses a lot of third party libraries because of this we need a reproducible example. From Reactor Netty point of view there is nothing that comes to my mind as a change that can cause this - https://github.com/reactor/reactor-netty/releases/tag/v1.1.15
from reactor-netty.
May be try to change the used Reactor BOM - instead of 2023.0.2, try 2023.0.1
from reactor-netty.
trying
from reactor-netty.
Hey @violetagg ,
Again, thank you for looking into this.
Our team is working on this issue, and we believe to have more clues.
With below code, issue is reproducible 100%
@Bean
public WebClient getWebClient(final WebClient.Builder builder, final SslContext sslContext) {
final var clientHttpConnector = new ReactorClientHttpConnector(HttpClient.create().wiretap(true).metrics(true, Function.identity()).protocol(HttpProtocol.HTTP11).secure(sslContextSpec -> sslContextSpec.sslContext(sslContext).handshakeTimeout(Duration.ofMinutes(1L)).closeNotifyFlushTimeout(Duration.ofMinutes(1L)).closeNotifyReadTimeout(Duration.ofMinutes(1L))));
return builder.baseUrl(hostAndPort).defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE).clientConnector(clientHttpConnector).build();
}
While strangely, with this code, it is working!
@Bean
public WebClient getWebClient(final SslContext sslContext) {
final var clientHttpConnector = new ReactorClientHttpConnector(HttpClient.create().wiretap(true).metrics(true, Function.identity()).protocol(HttpProtocol.HTTP11).secure(sslContextSpec -> sslContextSpec.sslContext(sslContext).handshakeTimeout(Duration.ofMinutes(1L)).closeNotifyFlushTimeout(Duration.ofMinutes(1L)).closeNotifyReadTimeout(Duration.ofMinutes(1L))));
return WebClient.builder().baseUrl(hostAndPort).defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE).clientConnector(clientHttpConnector).build();
}
Therefore, I think there is an issue with this final WebClient.Builder builder
It seems to correlate with log:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.reactive.function.client.WebClient$Builder]: Factory method 'webClientBuilder' threw exception with message: Error creating bean with name 'webClientHttpConnectorCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/web/reactive/function/client/ClientHttpConnectorAutoConfiguration.class]: Unsatisfied dependency expressed through method 'webClientHttpConnectorCustomizer' parameter 0: Error creating bean with name 'webClientHttpConnector' defined in class path resource [org/springframework/boot/autoconfigure/web/reactive/function/client/ClientHttpConnectorAutoConfiguration.class]: Failed to instantiate [org.springframework.http.client.reactive.ClientHttpConnector]: Factory method 'webClientHttpConnector' threw exception with message: Cannot reserve 49152 bytes of direct buffer memory (allocated: 10452747, limit: 10485760)
May I ask if you know if there can be any regression caused by final WebClient.Builder builder
?
from reactor-netty.
May I ask if you know if there can be any regression caused by final WebClient.Builder builder?
Please contact Spring Framework maintainers
from reactor-netty.
Understood, thank you
from reactor-netty.
Related Issues (20)
- Unable to configure Websocket compression when both HttpProtocol.H2C and HttpProtocol.HTTP1.1 are configured HOT 2
- Is it possible to be able to add custom labels to the metrics already being emitted HOT 2
- out of memory when prometheus is enabled and url with path varaible HOT 5
- Error decoding client data HOT 6
- Enabling DNS retryOnTimeout with TCP HOT 2
- Inconsistent reactor_netty_http_client_* and reactor_netty_tcp_client_* metrics when proxy in use HOT 6
- Connections warming up HOT 4
- default port based on PORT environment variable HOT 1
- Graceful shutdown of HttpClient HOT 6
- Reactor Netty IllegalReferenceCountException: refCnt: 0 HOT 11
- Support For Spnego Auth scheme support for netty HttpClient similar to Apache's HOT 3
- HTTP/1.1 is being logged and recorded by metrics even though HTTP/2 is enabled HOT 10
- proxy-authorization header is not propagated to proxy server HOT 9
- Support for Spengo auth scheme support for netty HttpClient similar to Apache HttpClient HOT 2
- Spring Cloud Gateway use reactor netty :Response header and response body packet capture were found to be separate HOT 1
- CompletableFuture is cancelled because Netty is closing the connection channel HOT 5
- WebSockets - MaxFramePayloadLength behaviour when using WebSocketServerSpec.compress(true) HOT 2
- Timeout leaves connection in the pool in configured state, blocking a pool slot HOT 17
- ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactor-netty.