suresh
12/21/2023, 3:35 AMcall.respondTextWriter
to do that. Seems like things are not working as expected. 🧵suresh
12/21/2023, 3:37 AMget("/jfr") {
call.respondTextWriter {
// start jfr stream and collect events and when event available calls
appendLine(event.toString())
// Might go on for few minutes
}
}
suresh
12/21/2023, 3:40 AMsuresh
12/21/2023, 3:42 AMrespondTextWriter
calls.
So for anything more than 30 seconds i am getting
2023-12-20 19:27:10.800 PST ERROR localhost [eventLoopGroupProxy-4-2] Application - Internal Server Error
io.netty.handler.timeout.WriteTimeoutException: null
Wrapped by: kotlinx.coroutines.JobCancellationException: Parent job is Cancelling
Suppressed: [CIRCULAR REFERENCE: kotlinx.coroutines.JobCancellationException: Parent job is Cancelling]
Wrapped by: java.io.IOException: kotlinx.coroutines.JobCancellationException: Parent job is Cancelling; job=CompletableDeferredImpl{Cancelled}@1b0beb07
at io.ktor.utils.io.jvm.javaio.OutputAdapter.close(Blocking.kt:134)
at java.base/sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:396)
at java.base/sun.nio.cs.StreamEncoder.lockedClose(StreamEncoder.java:231)
suresh
12/21/2023, 3:43 AMRustam Siniukov
12/21/2023, 12:50 PMflush()
?suresh
12/21/2023, 4:24 PMAleksei Tirman [JB]
01/03/2024, 8:10 AMsuresh
01/03/2024, 8:37 AMAleksei Tirman [JB]
01/03/2024, 9:01 AM--no-buffer
option?suresh
01/03/2024, 7:07 PM❯ curl -v --no-buffer <http://0.0.0.0:8080/jfr>
* Trying 0.0.0.0:8080...
* Connected to 0.0.0.0 (127.0.0.1) port 8080 (#0)
> GET /jfr HTTP/1.1
> Host: 0.0.0.0:8080
> User-Agent: curl/8.1.2
> Accept: */*
>
< HTTP/1.1 200 OK
< X-Engine: App-0.10.0.26+b2ee034
< Date: Wed, 03 Jan 2024 19:05:43 GMT
< Server: Ktor/0.10.0.26+b2ee034
< Content-Type: text/plain; charset=UTF-8
< transfer-encoding: chunked
<