https://kotlinlang.org logo
#ktor
Title
# ktor
d

David Smith

06/22/2022, 11:00 AM
Has anyone come across ktor server using CIO hanging on requests? I can’t pin it down yet but I have multiple requests hitting my server at once and it seems one of them at least is hanging, once it times out on the client side the other requests are handled fine. If I change to use the Netty engine then everything is fine
a

Aleksei Tirman [JB]

06/22/2022, 11:06 AM
What version of Ktor do you use?
d

David Smith

06/22/2022, 12:10 PM
2.0.2
interestingly, with Netty for POST calls (using jackson) I am hitting https://youtrack.jetbrains.com/issue/KTOR-1286/Cannot-receive-content-via-jackson-negotiator-since-142
The fix there works with netty but I still have the same issue with CIO.
Copy code
receivePipeline.intercept(ApplicationReceivePipeline.Before) {
            withContext(<http://Dispatchers.IO|Dispatchers.IO>) {
                proceed()
            }
        }
s/fix/workaround