Hi, we're using ktor 2.1.3 (had a bunch of issues trying to upgrade to 2.2.x) and have a ktor service that hits another external rest api using ktor client. After the service has been running for about 24 hours, all the ktor client requests start failing and continue to fail with:
io.ktor.client.network.sockets.ConnectTimeoutException: Connect timeout has expired [url=<<REDACTED>>, connect_timeout=unknown ms]
at io.ktor.client.plugins.HttpTimeoutKt.ConnectTimeoutException(HttpTimeout.kt:209)
at io.ktor.client.plugins.HttpTimeoutKt.ConnectTimeoutException$default(HttpTimeout.kt:206)
at io.ktor.client.engine.cio.Endpoint.getTimeoutException(Endpoint.kt:217)
at io.ktor.client.engine.cio.Endpoint.connect(Endpoint.kt:206)
at io.ktor.client.engine.cio.Endpoint.access$connect(Endpoint.kt:23)
at io.ktor.client.engine.cio.Endpoint$connect$1.invokeSuspend(Endpoint.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
If we restart the service all the errors go away.
Has anyone seen this?
Thanks,
Brent