Funny... even with suspendApp ( with the resource ...
# arrow
d
Funny... even with suspendApp ( with the resource library for Ktor) and I still get things like what I posted in the thread...
2023-03-19T164148.282584326Z stdout F at java.base/java.lang.Thread.run(Unknown Source) 2023-03-19T164148.282579843Z stdout F at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) 2023-03-19T164148.282575289Z stdout F at io.ktor.server.netty.EventLoopGroupProxy$Companion.create$lambda$1$lambda$0(NettyApplicationEngine.kt:291) 2023-03-19T164148.282570761Z stdout F at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) 2023-03-19T164148.282566191Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) 2023-03-19T164148.282561578Z stdout F at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) 2023-03-19T164148.282548044Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) 2023-03-19T164148.282539852Z stdout F at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) 2023-03-19T164148.282535257Z stdout F at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) 2023-03-19T164148.28252936Z stdout F at io.netty.channel.AbstractChannelHandlerContext$2.run(AbstractChannelHandlerContext.java:200) 2023-03-19T164148.282524878Z stdout F at io.netty.channel.AbstractChannelHandlerContext.access$100(AbstractChannelHandlerContext.java:61) 2023-03-19T164148.282520391Z stdout F at io.netty.channel.AbstractChannelHandlerContext.invokeChannelUnregistered(AbstractChannelHandlerContext.java:222) 2023-03-19T164148.282515315Z stdout F at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) 2023-03-19T164148.282510917Z stdout F at io.netty.channel.ChannelInboundHandlerAdapter.exceptionCaught(ChannelInboundHandlerAdapter.java:143) 2023-03-19T164148.282506399Z stdout F at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:317) 2023-03-19T164148.282501626Z stdout F at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:328) 2023-03-19T164148.282496187Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:817) 2023-03-19T164148.282491599Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.execute0(SingleThreadEventExecutor.java:827) 2023-03-19T164148.282485457Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:836) 2023-03-19T164148.282480939Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:344) 2023-03-19T164148.28247262Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:351) 2023-03-19T164148.28246686Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:934) 2023-03-19T164148.28246187Z stdout F java.util.concurrent.RejectedExecutionException: event executor terminated 2023-03-19T164148.282456586Z stdout F 2023-03-19 164148.281 [eventLoopGroupProxy-4-1] WARN i.n.c.AbstractChannelHandlerContext - Failed to submit an exceptionCaught() event. 2023-03-19T164148.282451864Z stdout F at java.base/java.lang.Thread.run(Unknown Source) 2023-03-19T164148.282446907Z stdout F at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) 2023-03-19T164148.282442223Z stdout F at io.ktor.server.netty.EventLoopGroupProxy$Companion.create$lambda$1$lambda$0(NettyApplicationEngine.kt:291) 2023-03-19T164148.282437653Z stdout F at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) 2023-03-19T164148.282432966Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) 2023-03-19T164148.282427991Z stdout F at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) 2023-03-19T164148.282419426Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) 2023-03-19T164148.282415017Z stdout F at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) 2023-03-19T164148.282410006Z stdout F at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) 2023-03-19T164148.282405396Z stdout F at io.netty.channel.AbstractChannelHandlerContext$4.run(AbstractChannelHandlerContext.java:286) 2023-03-19T164148.282400788Z stdout F at io.netty.channel.AbstractChannelHandlerContext.access$300(AbstractChannelHandlerContext.java:61) 2023-03-19T164148.282395754Z stdout F at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:305) 2023-03-19T164148.282377186Z stdout F at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:81) 2023-03-19T164148.282372275Z stdout F at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:274) 2023-03-19T164148.282367257Z stdout F at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:283) 2023-03-19T164148.28236281Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:817) 2023-03-19T164148.282358454Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.execute0(SingleThreadEventExecutor.java:827) 2023-03-19T164148.282353822Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:836) 2023-03-19T164148.282349128Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:344) 2023-03-19T164148.282344352Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:351) 2023-03-19T164148.282338727Z stdout F at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:934) 2023-03-19T164148.282330285Z stdout F java.util.concurrent.RejectedExecutionException: event executor terminated
Shouldn't suspendApp be shutting things down gracefully?
s
Shouldn't suspendApp be shutting things down gracefully?
There is no such thing as magic ­čśů You still need to properly use
Resource
and compose things. Not that
ctrl+c
is not properly handled by Gradle, and it forcefully terminates the application
SIGKILL
. Hard to say what is going on without any code.