Hey, when sending a lot of requests for testing reasons to my ktor server in a k-native cluster i ob...
a
Hey, when sending a lot of requests for testing reasons to my ktor server in a k-native cluster i observed that at one point it started to only throw exception like
kotlinx.coroutines.JobCancellationException: LazyStandaloneCoroutine was cancelled
and
Copy code
java.util.concurrent.RejectedExecutionException: event executor terminated
at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:934)
this probably due to resource limitations in the pods since adding some Netty configration, i found in the channel, more or less solved the issue.
Copy code
embeddedServer(Netty, port = Env.Http().port, host = "0.0.0.0",configure = {
    requestQueueLimit = 8
    runningLimit = 5
    shareWorkGroup = true
    configureBootstrap = {
        group(NioEventLoopGroup(8, Executors.newCachedThreadPool()))
    }
})
Someone maybe know some more resources to read about these parameters because it’s only guessing at the moment? It’s probably rather netty specific? Did you guys maybe have similar issues with resources? I’m trying to figure out what minimal resoureces should be allocated…
224 Views