rrva
06/15/2020, 4:05 PMrequestTimeoutMillis
it is not needed to set connectionRequestTimeout on the engine level as well, right?
I am thinking to add to the following code
val client = HttpClient(Apache) {
engine {
connectionRequestTimeout = 400
}
install(HttpTimeout) {
connectTimeoutMillis = 400
socketTimeoutMillis = 100
}
}
into
val client = HttpClient(Apache) {
engine {
connectionRequestTimeout = 400
}
install(HttpTimeout) {
requestTimeoutMillis = 400
connectTimeoutMillis = 400
socketTimeoutMillis = 100
}
}
Mostly to cover time spent in cases not covered by the other three timeouts (name resolution in DNS for example)Anders Sveen
06/16/2020, 2:16 PMjeggy
06/17/2020, 10:09 AMCannot read from a servlet input stream
, only somtimes and only in production. Anyone know how to pin point what's causing this? I can see that if I dig down into the exception it also says this: Idle timeout expired: 30000/30000 ms
.
When this occurs, it will keep occuring for about 50% of all requests for an hour or so and doesn't seem like it's anything specific for my implemented routes.
Shutting down the service and starting it up doesn't seem to fix it either.Anders Sveen
06/17/2020, 11:02 AMcall.receive()
? I have been setting requestReadTimeoutSeconds
(see post above), but realized there are only certain endpoints (from mobile clients with intermittent internet) that I care about. So I'd rather set it for each seaparate one... Any idea?Marcin Wisniowski
06/17/2020, 9:00 PMsultanofcardio
06/18/2020, 2:04 AMTimeoutCancellationException
received when using ktor-http-client? Last asked here https://kotlinlang.slack.com/archives/C0A974TJ9/p1588270342385000Matej Drobnič
06/18/2020, 3:47 AMwithContext(<http://Dispatchers.IO|Dispatchers.IO>)
? That would look pretty messy.andev
06/18/2020, 6:03 AMMoses Mugisha
06/22/2020, 1:01 PMaleksey.tomin
06/22/2020, 1:03 PMmanlan
06/23/2020, 5:17 AMJag
06/23/2020, 5:43 AMhhariri
Orhan Tozan
06/23/2020, 3:50 PMjeggy
06/23/2020, 4:12 PMCarlos Fau
06/23/2020, 9:20 PMTobias
06/24/2020, 12:40 PMbjonnh
06/24/2020, 11:27 PMDariusz Kuc
06/25/2020, 1:14 AM<http://client.ws|client.ws>() {
send(GQL_CONNECTION_INIT)
val ackFlow = incoming.receiveAsFlow()
// verify ack messages
send(GQL_START)
val response = incoming.receiveAsFlow() // <- HOW TO RETURN THIS?
// error handling, closing session and unsubscribing omitted for clarity
}
I was hoping to wrap the above in some method that returns the response: Flow
is that even possible? Further caveat is that this flow of responses would also have to be filtered for keep alive messages….aleksey.tomin
06/25/2020, 7:34 AMio.ktor:ktor-client-curl:1.3.2
doyaaaaaaken
06/25/2020, 8:29 AMAs I said, I use SessionStorage.
<https://ktor.io/servers/features/sessions/storages.html>
And I find the responded cookie value is in below format.
`78a095a61d3e58a2`
This value is generated by `generateNonce` function.
<https://github.com/ktorio/ktor/blob/master/ktor-server/ktor-server-core/jvm/src/io/ktor/sessions/SessionsBuilder.kt#L271>
(The concrete implementation is in Nonce.kt <https://github.com/ktorio/ktor/blob/master/ktor-utils/jvm/src/io/ktor/util/Nonce.kt> )
I understand the cookie value is hard to guess because the SecureRandom is used, but I'm worried about collision.
The cookie value is 64bit. (`78a095a61d3e58a2`)
So, the expected number of cookie values that can be generated before getting a collision is 2^(64/2) = 4,294,967,296.
> The birthday problem in this more generic sense applies to hash functions: the expected number of N-bit hashes that can be generated before getting a collision is not 2N, but rather only 2N⁄2.
<https://en.wikipedia.org/wiki/Birthday_problem>
I wonder if 4,294,967,296 is enough to protect birthday attack.
Does anyone know about this?
andev
06/25/2020, 1:55 PMstop
function?
Is this server.stop(gracePeriodMillis = 0, timeoutMillis = 0)
okay, or I need to pass non-zero values?Ivan
06/26/2020, 8:30 AMLastExceed
06/27/2020, 9:59 AMmanlan
06/27/2020, 3:07 PMJohn O'Reilly
06/27/2020, 4:18 PMio.ktor.http.IllegalHeaderValueException: Header value '___utmvazauvysSB=TIAZsaY; path=/; Max-Age=900' contains illegal character '' (code 1)
at io.ktor.http.HttpHeaders.checkHeaderValue(HttpHeaders.kt:153)
at io.ktor.http.HeadersBuilder.validateValue(Headers.kt:43)
at io.ktor.util.StringValuesBuilder.appendAll(StringValues.kt:208)
at io.ktor.client.engine.android.AndroidClientEngine.execute(AndroidClientEngine.kt:92)
I can open url in browser for example and do see valid json returned.Ayodele
06/28/2020, 5:45 PMhhariri
BearDev
06/30/2020, 12:57 AMLuis Munoz
06/30/2020, 3:33 AM