Closed kpatil001 closed 7 months ago
I think I'm bumping into this - during testing, if the stream has ended when I invoke my lambda, it takes just over 3 seconds, where normally it takes a couple of hundred ms warm. I suspect there's a 3 second timeout on the call, and my lambda then says 'got no data, returning'.
Hello, apologies for the late response, it seems that this is related to the 3 second timeout of GetMedia. It takes 3 seconds of no data before it returns. Is this still an issue we can assist you with?
Uh, I ran into this nearly 2 years ago. In the end I rewrote my entire function into Go and used a go MKV parser to read from the Kinesis stream. So no, I no longer need assistance.
For future googlers at least, is this 3 second timeout documented somewhere, or configurable?
The 3 second timeout is not configurable, and we don't currently have this documented anywhere. We are considering adding these details to our GetMedia documentation, and I will link it here once that becomes available. Thank you for bringing this to our attention.
Here is the newly added documentation describing this timeout: https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_GetMedia.html#:~:text=The%20GetMedia%20HTTP%20response%20status%20code%20will%20be%20returned%20immediately%2C%20but%20the%20reading%20of%20the%20HTTP%20response%20payload%20will%20timeout%20after%203%20seconds%20if%20there%20are%20no%20ingested%20fragments%20available%20for%20playback
Hi Team, I am working on use case, where we are performing transcription on audio call which is streamed from a telephony system to KVS, we are using amazon-chime-voiceconnector-transcription to perform this, which is internally using kinesis parser library. I am observing that when a call ends i.e, when KVS stream is about to end, fetching data from KVS is taking 3000+ milliseconds of time. getByteBufferFromStream() is used to get data from kvs, this function is called here.
In following logs I am logging last two call to request function.
Three numbers logged beside getByteBufferFromStream() function call are :
As you can see that last 2nd call to getByteBufferFromStream is taking 3465 milliseconds and returns butebuffer of 960 length, sometimes length of byteBuffer is 0. Could you please provide some pointers on the cause of this latency and if there is a way to minimize or avoid this latency.