Closed
Description
getting the following exception on server, when using webflux
happened for 7 api calls (request-response)
encountered the issue 14 times within 2 minutes
these were thrown twice for the same api request-response exchange, the turnaround frame of this one was 150ms
> {
"exceptionTraceHeirarchy": {},
"exceptionMeta": {
"className": "reactor.netty.ReactorNetty$InternalNettyException",
"message": "java.nio.channels.ClosedChannelException",
"cause": {
"stackTrace": [
{
"methodName": "newClosedChannelException",
"fileName": "AbstractChannel.java",
"lineNumber": 955,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannel$AbstractUnsafe"
},
{
"methodName": "write",
"fileName": "AbstractChannel.java",
"lineNumber": 863,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannel$AbstractUnsafe"
},
{
"methodName": "write",
"fileName": "DefaultChannelPipeline.java",
"lineNumber": 1378,
"nativeMethod": false,
"className": "io.netty.channel.DefaultChannelPipeline$HeadContext"
},
{
"methodName": "invokeWrite0",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 716,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "invokeWrite",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 708,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "write",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 791,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "write",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 701,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "write",
"fileName": "LoggingHandler.java",
"lineNumber": 249,
"nativeMethod": false,
"className": "io.netty.handler.logging.LoggingHandler"
},
{
"methodName": "invokeWrite0",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 716,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "invokeWrite",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 708,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "write",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 791,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "write",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 701,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "write",
"fileName": "CombinedChannelDuplexHandler.java",
"lineNumber": 528,
"nativeMethod": false,
"className": "io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext"
},
{
"methodName": "write",
"fileName": "MessageToMessageEncoder.java",
"lineNumber": 112,
"nativeMethod": false,
"className": "io.netty.handler.codec.MessageToMessageEncoder"
},
{
"methodName": "write",
"fileName": "CombinedChannelDuplexHandler.java",
"lineNumber": 348,
"nativeMethod": false,
"className": "io.netty.channel.CombinedChannelDuplexHandler"
},
{
"methodName": "invokeWrite0",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 716,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "invokeWrite",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 708,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "write",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 791,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "write",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 701,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "write",
"fileName": "HttpTrafficHandler.java",
"lineNumber": 232,
"nativeMethod": false,
"className": "reactor.netty.http.server.HttpTrafficHandler"
},
{
"methodName": "invokeWrite0",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 716,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "invokeWrite",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 708,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "access$1700",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 56,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext"
},
{
"methodName": "write",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 1102,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask"
},
{
"methodName": "write",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 1149,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask"
},
{
"methodName": "run",
"fileName": "AbstractChannelHandlerContext.java",
"lineNumber": 1073,
"nativeMethod": false,
"className": "io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask"
},
{
"methodName": "safeExecute",
"fileName": "AbstractEventExecutor.java",
"lineNumber": 163,
"nativeMethod": false,
"className": "io.netty.util.concurrent.AbstractEventExecutor"
},
{
"methodName": "runAllTasks",
"fileName": "SingleThreadEventExecutor.java",
"lineNumber": 416,
"nativeMethod": false,
"className": "io.netty.util.concurrent.SingleThreadEventExecutor"
},
{
"methodName": "run",
"fileName": "EpollEventLoop.java",
"lineNumber": 331,
"nativeMethod": false,
"className": "io.netty.channel.epoll.EpollEventLoop"
},
{
"methodName": "run",
"fileName": "SingleThreadEventExecutor.java",
"lineNumber": 918,
"nativeMethod": false,
"className": "io.netty.util.concurrent.SingleThreadEventExecutor$5"
},
{
"methodName": "run",
"fileName": "ThreadExecutorMap.java",
"lineNumber": 74,
"nativeMethod": false,
"className": "io.netty.util.internal.ThreadExecutorMap$2"
},
{
"methodName": "run",
"fileName": "FastThreadLocalRunnable.java",
"lineNumber": 30,
"nativeMethod": false,
"className": "io.netty.util.concurrent.FastThreadLocalRunnable"
},
{
"moduleName": "java.base",
"moduleVersion": "15.0.2",
"methodName": "run",
"fileName": "Thread.java",
"lineNumber": 832,
"nativeMethod": false,
"className": "java.lang.Thread"
}
],
"suppressed": []
}
}
}
but the request-response transition details were as follows
> {
"signalType": {
"declaringClass": "reactor.core.publisher.SignalType",
"name": "ON_COMPLETE",
"ordinal": 6,
"clazz": "reactor.core.publisher.SignalType",
"hashCode": 70220229,
"toString": "onComplete"
},
"events": {
"Begin": {
"value": NumberLong( 1614251699546 ),
"unit": "MilliSecond"
},
"End": {
"value": NumberLong( 1614251699696 ),
"unit": "MilliSecond"
},
"Frame": {
"value": NumberLong( 150518814 ),
"unit": "NanoSecond"
}
},
"serverHttpRequest": {
"_id": "af109c76",
"method": {
"declaringClass": "org.springframework.http.HttpMethod",
"name": "GET",
"ordinal": 0,
"clazz": "org.springframework.http.HttpMethod",
"hashCode": 1493586489,
"toString": "GET"
},
"methodValue": "GET"
},
"path": {
"contextPath": {
"elements": [],
"value": "",
"clazz": "org.springframework.http.server.DefaultPathContainer",
"hashCode": 0,
"toString": ""
},
"pathWithinApplication": {
"elements": [
{
"value": "/",
"clazz": "org.springframework.http.server.DefaultPathContainer$$Lambda$841/0x0000000801358440",
"hashCode": 1401830440,
"toString": "org.springframework.http.server.DefaultPathContainer$$Lambda$841/0x0000000801358440@538e3c28"
},
{
"value": "xyz",
"clazz": "org.springframework.http.server.DefaultPathContainer$DefaultPathSegment",
"hashCode": -173788331,
"toString": "[value='xyz']"
}
],
"value": "/xyz",
"clazz": "org.springframework.http.server.DefaultPathContainer",
"hashCode": 775197828,
"toString": "/xyz"
},
"elements": [
{
"value": "/",
"clazz": "org.springframework.http.server.DefaultPathContainer$$Lambda$841/0x0000000801358440",
"hashCode": 1401830440,
"toString": "org.springframework.http.server.DefaultPathContainer$$Lambda$841/0x0000000801358440@538e3c28"
},
{
"value": "xyz",
"clazz": "org.springframework.http.server.DefaultPathContainer$DefaultPathSegment",
"hashCode": -173788331,
"toString": "[value='xyz']"
}
],
"value": "/xyz",
"clazz": "org.springframework.http.server.DefaultRequestPath",
"hashCode": -1583998968,
"toString": "/xyz"
},
"serverHttpResponse": {
"cookies": {
"size": 0,
"isEmpty": true,
"clazz": "org.springframework.util.CollectionUtils$MultiValueMapAdapter",
"hashCode": 0,
"toString": "{}"
},
"headers": {
"acceptLanguage": [],
"acceptLanguageAsLocales": [],
"accessControlAllowCredentials": false,
"accessControlAllowHeaders": [],
"accessControlExposeHeaders": [],
"accessControlMaxAge": NumberLong( -1 ),
"accessControlRequestHeaders": [],
"connection": [],
"contentDisposition": {
"type": "",
"clazz": "org.springframework.http.ContentDisposition",
"hashCode": 0,
"toString": ""
},
"contentLength": NumberLong( 120515 ),
"contentType": {
"charset": {
"aliases": [
"unicode-1-1-utf-8",
"UTF8"
],
"canEncode": true,
"displayName": "UTF-8",
"isRegistered": true,
"name": "UTF-8",
"clazz": "sun.nio.cs.UTF_8",
"hashCode": 81070450,
"toString": "UTF-8"
},
"parameters": {
"charset": "UTF-8"
},
"qualityValue": 1.0,
"type": "application",
"subtype": "json",
"isConcrete": true,
"isWildcardType": false,
"isWildcardSubtype": false,
"removeQualityValue": {
"charset": {
"aliases": [
"unicode-1-1-utf-8",
"UTF8"
],
"canEncode": true,
"displayName": "UTF-8",
"isRegistered": true,
"name": "UTF-8",
"clazz": "sun.nio.cs.UTF_8",
"hashCode": 81070450,
"toString": "UTF-8"
},
"parameters": {
"charset": "UTF-8"
},
"qualityValue": 1.0,
"type": "application",
"subtype": "json",
"isConcrete": true,
"isWildcardType": false,
"isWildcardSubtype": false,
"clazz": "org.springframework.http.MediaType",
"hashCode": -224654938,
"toString": "application/json;charset=UTF-8"
},
"clazz": "org.springframework.http.MediaType",
"hashCode": -224654938,
"toString": "application/json;charset=UTF-8"
},
"date": NumberLong( -1 ),
"expires": NumberLong( -1 ),
"ifMatch": [],
"ifModifiedSince": NumberLong( -1 ),
"ifNoneMatch": [],
"ifUnmodifiedSince": NumberLong( -1 ),
"lastModified": NumberLong( -1 ),
"vary": [],
"size": 2,
"isEmpty": false,
"mapVsList": {
"Content-Length": [
"120515"
],
"Content-Type": [
"application/json;charset=UTF-8"
]
},
"clazz": "org.springframework.http.ReadOnlyHttpHeaders",
"hashCode": 373937919,
"toString": "[Content-Type:\"application/json;charset=UTF-8\", Content-Length:\"120515\"]"
},
"statusCode": {
"value": 200,
"reasonPhrase": "OK",
"is1xxInformational": false,
"is2xxSuccessful": true,
"is3xxRedirection": false,
"is4xxClientError": false,
"is5xxServerError": false,
"isError": false,
"series": {
"value": 2,
"declaringClass": "org.springframework.http.HttpStatus$Series",
"name": "SUCCESSFUL",
"ordinal": 1,
"clazz": "org.springframework.http.HttpStatus$Series",
"hashCode": 2089181889,
"toString": "SUCCESSFUL"
},
"declaringClass": "org.springframework.http.HttpStatus",
"name": "OK",
"ordinal": 4,
"clazz": "org.springframework.http.HttpStatus",
"hashCode": 2123877965,
"toString": "200 OK"
},
"committedFlag": true,
"clazz": "org.springframework.http.server.reactive.ReactorServerHttpResponse",
"hashCode": 2095929933,
"toString": "org.springframework.http.server.reactive.ReactorServerHttpResponse@7ced5a4d"
},
}
using the following dependencies to be precise
> `<!-- Spring -->`
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb-reactive</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
`<!-- Test -->`
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
`<!-- Interceptor -->`
<dependency>
<groupId>com.github.TurquoiseSpace</groupId>
<artifactId>spring-webflux-http-interceptor</artifactId>
<version>${turquoise.space.version}</version>
</dependency>
Metadata
Metadata
Assignees
Labels
No labels